axapta - AX2012 X++ Partial posting of Purch lines -
i want post invoice of selected lines of purch order(po) through code. need in code. can me coding ?
the formletter framework has method chooselinesquery
accepts query of lines update.
see this blog.
code sales order (you can more or less substitute 'sales' 'purch'):
salestable salestable = salestable::find('your-order'); salesformletter salesformletter = salesformletter::construct(documentstatus::invoice); query query = new query(querystr(salesupdatepackingslip)); querybuilddatasource qbds = query.datasourcetable(tablenum(salesline)); // build query range find lines needs posted. qbds.addrange(fieldnum(salesline, salesstatus)).value(queryvalue(salesstatus::backorder)); salesformletter.chooselinesquery(new queryrun(query)); salesformletter.update(salestable);
Comments
Post a Comment