I tried from different scenario, but it didn't work out. any solution pls update. it would be a very helpful for me.
Other scenario which i applied :
SalesTable salesTable;
SalesFormLetter salesInvoice;
Query query;
QueryRun queryRun;
QueryBuildDataSource qbds;
;
salesTable = SalesTable::find('SO_00002727');
query = new Query(QueryStr(SalesUpdatePackingSlip));
qbds = query.dataSourceTable(tableNum(SalesLine));
qbds.addRange(fieldNum(SalesLine, SalesId)).value(queryValue('SO_00002727'));
qbds.addRange(fieldNum(SalesLine, ItemId)).value(queryValue('item1'));
queryRun = new QueryRun(query);
salesInvoice = SalesFormLetter::construct(DocumentStatus::PackingSlip);
salesInvoice.chooseLinesQuery(queryRun);
salesInvoice.update(salesTable);
Any solution for this. Pls update????
Thanks in advance