Sales agreement form is not showing all agreement details


I have created a sales agreement header and created a line using x++ script; I can see the line in listpage but the same line is not showing in sales agreement form when i tried to open by double click.

(The item id 1105 is manually created on the form and its showing perfectly and the Item id 1201 I have created by using a X++ Job which is shown in list page but not showing in form)

PFB Screen for more details

Agrement form is using ALine datasource which is inherited…!!


Analyse the tables populated at the manual creation of an agreement line, you will be missing one in code and that is causing it not to display (probably)

If it is not showing in the form, you need to look at the inner join tables in the form(to see if the related data is inserted properly). Secondly you need to check the ranges applied on the data sources.
If you are still unable to identify the issue, please share your code with us.

Hi Kranthi,

I have found this job in a blog which matches my requirement.

static void Job3(Args _args)
//MkSalesAgreementContract lAgreementContract;
//MkAgreementLineContract lAgreementContractLine;
SalesAgreementHeader lSalesAgreementHeader;
//AgreementLine lAgreementLine;
// // as AgreementLine is Abstract table we can not insert data directly, hence we need to insert into child table.
AgreementLineQuantityCommitment lAgreementLine;
ListIterator literator;
List lAgreementList;
LineNum lineNum;
SalesAgreementForm salesAgreementForm;


select lSalesAgreementHeader where lSalesAgreementHeader.SalesNumberSequence == “INMF-000009”;
lAgreementLine.Agreement = lSalesAgreementHeader.RecId;
lAgreementLine.ItemId = ‘1201’;
lAgreementLine.Category = 0;
lAgreementLine.AgreementLineType = CommitmentType::ProductQuantity;
lAgreementLine.EffectiveDate = 21\10\2016; //lAgreementContractLine.EffectiveDate();
lAgreementLine.ExpirationDate = 21\11\2017;// lAgreementContractLine.ExpirationDate();
lAgreementLine.CommitedQuantity = 1;//lAgreementContractLine.Qty();
lAgreementLine.LineNumber = 2;

if (lAgreementLine.validateWrite())


So i hope you were able to resolve the issue.