A very common requirement these days is to automate the Invoice Posting for Sales Orders.
Follow the below mentioned steps :-
Step 1) Add a new Runnable class in your Project
Step 2) Write the following code :-
SalesFormLetter letter = SalesFormLetter::construct(DocumentStatus::Invoice);
SalesTable salestbl;
salestbl=SalesTable::find('000814');
letter.update(salestbl,SystemDateGet(),SalesUpdate::All,AccountOrder::None,false,true);
info('Success');
No comments:
Post a Comment