Hi Experts,
I would like to update the data "Incoterms" and "Incoterms Location" of existing Purchase Order ID in ABSL. I worte some codes in ABSL of custom BO. But the following error is shown and cannot update correctly. Error → "Location for Incoterms missing; enter an Incoterms location"
Here is my code. I also traced the code and the data is correctly filled to the fields respectively during debug time. But the error is shown and save failed at the end. Please kindly help.
import ABSL;
import AP.Purchasing.Global;
var query = PurchaseOrder.QueryByElements;
var param = query.CreateSelectionParams();
param.Add(query.ID.content, "I", "EQ", "1234");
var result = query.Execute(param);
foreach (var header in result) {
if (header.DeliveryTerms.IsSet()) {
header.DeliveryTerms.Incoterms.ClassificationCode = "FOB";
header.DeliveryTerms.Incoterms.TransferLocationName = "Hamburg";
}
header.SubmitForOrder();
}
Thanks and Regards,
Thiri