History maintaining by createdby/modifiedby in history table
History maintaining by createdby/modifiedby in history table:
// + My Comment (Added by incadmin - INC-vinod - Start 24/10/2018)
void clicked()
{
INC_DeliveryDateHistory history;
super();
select history where history.SalesId == SalesTable.SalesId;
if(!history)
{
history.SalesId = SalesTable.SalesId;
history.INC_DeliveryDate = SalesTable.INC_DeliveryDate;
history.INC_CreatedBy = curUserId();
history.INC_CreatedDateTime = DateTimeUtil::utcNow();
history.insert();
info("Delivery date is confirmed.");
}
else
{
history.SalesId = SalesTable.SalesId;
history.INC_DeliveryDate = SalesTable.INC_DeliveryDate;
history.INC_CreatedBy = "";
history.INC_CreatedDateTime = str2datetime('',1);
history.INC_ModifiedBy = curUserId();
history.INC_ModifiedDateTime = DateTimeUtil::utcNow();
history.insert();
info("Modified Delivery date is confirmed.");
}
}
// - My Comment -INC-Vinod - End
// + My Comment (Added by incadmin - INC-vinod - Start 24/10/2018)
void clicked()
{
INC_DeliveryDateHistory history;
super();
select history where history.SalesId == SalesTable.SalesId;
if(!history)
{
history.SalesId = SalesTable.SalesId;
history.INC_DeliveryDate = SalesTable.INC_DeliveryDate;
history.INC_CreatedBy = curUserId();
history.INC_CreatedDateTime = DateTimeUtil::utcNow();
history.insert();
info("Delivery date is confirmed.");
}
else
{
history.SalesId = SalesTable.SalesId;
history.INC_DeliveryDate = SalesTable.INC_DeliveryDate;
history.INC_CreatedBy = "";
history.INC_CreatedDateTime = str2datetime('',1);
history.INC_ModifiedBy = curUserId();
history.INC_ModifiedDateTime = DateTimeUtil::utcNow();
history.insert();
info("Modified Delivery date is confirmed.");
}
}
// - My Comment -INC-Vinod - End
Comments
Post a Comment