Hi
I want to create a new agreementline. But when I run my job´, nothing happens.
SalesAgreementHeader h;
AgreementClassification c;
AgreementLineQuantityCommitment a;
while select forupdate h
where h.CustAccount == '123456'
join c
where h.AgreementClassification == c.RecId
&& c.NCSalesOriginId == 'ML'
join a
where a.Agreement == h.RecId
{
ttsBegin;
select forUpdate a;
a.Agreement = h.RecId;
a.NCServiceId = 'M5CT021';
a.ItemId = '160022';
a.PriceUnit = 1;
a.PricePerUnit = 0;
a.EffectiveDate = 01\01\2016;
a.ExpirationDate = 31\12\2016;
a.insert();
ttsCommit;
info(strFmt('%1',h.SalesNumberSequence));
}
*This post is locked for comments
I have the same question (0)