I've developed this piece of code to update delivery dates for planned transfer orders.
It seems to work on a small subset orders but will stop updating the table at ~2000 records but the output is showing all of the fields as being updated.
If anyone has any suggestions that would be great!
static void updateDeliveryDate(Args _args)
{
ReqPO reqPO;
ReqTrans reqTrans;
date dlvDate = str2Date('11/05/2017', 123);
while select forUpdate reqPO
join reqTrans
where reqPO.RefId == reqTrans.RefId
&& reqPO.RefType == reqTrans.RefType
&& reqPO.PlanVersion == reqTrans.PlanVersion
&& reqPO.RefType == 34
{
reqPO.ReqDateDlv = dlvDate;
reqPO.update();
info(strFmt("Item ID: %1, Delivery Date: %2", reqPO.ItemId, reqPO.ReqDateDlv));
}
}
*This post is locked for comments
I have the same question (0)