Hello!
I’m testing some code in a ubaq that updates one custom field on the orderhed. I’ve followed the trace, and this also works in BL tester. When the same steps are ran in the UBAQ I get an error that no changes can be made because a release has been allocated. The thing is, I’m not touching the orderrel data. And in master update I specify that OrderHed is the changed table. What am I missing here?
Erp.Tablesets.SalesOrderTableset mySODataSet = new Erp.Tablesets.SalesOrderTableset();
var globalSONum = (int)ttResults[0]["Calculated_lkOrderNum"]; //uses columns aliases for input
var globalOrderStatus = (string)ttResults[0]["Calculated_ipOrderStatus"];
bool param1;
string three;
string four;
string five;
string six;
string seven;
string eight;
Action<int,string> UpdateOrderHed = (myOrderNum, myOrderStatus) =>
{
using (var soSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.SalesOrderSvcContract>(Db)) //Create SO service object
{
mySODataSet = soSvc.GetByID(myOrderNum);
var headerRecordToUpdate = mySODataSet.OrderHed.FirstOrDefault();
headerRecordToUpdate.SetUDField<string>("OrderStatus_c",myOrderStatus);
headerRecordToUpdate.SetRowState(IceRowState.Updated);
soSvc.MasterUpdate(true,true,"OrderHed",832,myOrderNum, true, out param1, out three, out four, out five, out six, out seven, out eight, ref mySODataSet);
}
};
UpdateOrderHed(globalSONum,globalOrderStatus);
BL Tester Params that work even when a release is allocated: