Hi EveryBody
I just made a new report for printing "proforma invoice", so a decided to add an action in the "sales invoice list" for printing my report. I've added my action and everything works on, but when I click my print button, in the request page I have to select the number of the invoice I want to print (leave it blank will print the entire list).
Rememberring what appens on printing posted invoices (if you don't specify any number only the selected invoice will be printed) i took a look to the page 143 "Posted Sales Invoices".
Surprise!! In the action 20 (Print) "RunObject" field it's "Undefined" and I can't understand how it works...
How can I get the same behaviour for my report?
0
Comments
There is no surprise, just c/al code.
Press F9 key and look at the code in <Action20> - OnAction() trigger.
Good luck.
There is a c/al code: As you can see this action call function PrintRecords from table 112 Sales Invoice Header, not report.
Here is a listing of PrintRecords function:
It means that for every record in table Report Selection with field Usage = S.Invoice system will call linked report.
You can add your report to this table:
In RTC: Departments/Administration/Application Setup/Sales & Marketing/Sales/Report Selection Sales
Select Invoice option from Usage list.
Add your report.
Now if you click Print Action system propose you to print both reports (the old one, and than your report).
Unfortunately with my license (Company end user) I can't access to the C/AL code of the pages...
Really I think the solution it's very simple.. just add an action in the process section of Invoice List page then put this 2 lines of code and a variable (SalesHeader which is "Sales Header" record)
I think I need to upgrade my professional msdn subscription to Premium... :-#
Print action works same way for Sales Header and Sales Invoice Header etc.
Select appropriate option from Usage list, for example you can select option Order.
May be you should think about Application Builder granule.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!