Print Options using CheckBox

Hi Guys,

I have add a checkbox in the form SalesEditLines called " Print Loading Manifest" which should able the user to decide to print the loading manifest with sales invoice or not (While Invoicing). currently its mandatory to print loading manifest along with sales invoices. I added the checkbox in the from, now what type of method or code to be given to achieve the above.

below is the code generating loading manifest in the class SalesFormLetter_Invoice.

void printJournal()
SalesShippingStat salesShippingStat;
boolean newline;

if (journalList.len() > 0)
if (printFormletter)

custInvoiceJour.printJournal(this, journalList);
custInvoiceJour.printLoadingManifest(this, journalList);

I hope the check box you added is similar to the print invoice, if so you can add new parameter to \Classes\SalesFormLetter\initParameters and pass the user selected value in \Forms\SalesEditLines\Methods\closeOk
You can use similar approach that is used for other print parameters like - _printFormLetter, _printShippingLabel etc…

Dear Kranthi,

Thanks for the reply.
I have tried all the way as you said and I couldn’t succeeded. Seems its tough for me since i am a beginner in AX developments. Is there any other way to add this parameter somewhere like customer level or SO level ? please advise.

The best way is to add it while posting, so that you are giving an option for user to select it before posting.
What is stopping you to do that?

Hey guys,

Good discussion, but I’m going to move this over to the developer forum.