Search This Blog

Monday, 10 April 2017

Create Export File Format For Method of Payment in AX 2009

This Blog is related to the Receipt Journal Payment Generation Process.

So Basically on the Account Receivable form when you created the new Journal like this.



















Navigation Account Receivable -> Journals -> Payments -> Receipt Journal.

after that once you click the lines a new form will open where you create the payment proposal.












After that you click on the functions -> generate payments button a new dialog will open where you select the method of payment radio button or the export file format radio button like this.




















if you select the method of payment than the file format that you have define in method of payment setup form will be use to generating the file.

Go to Account Receivable -> Setup ->  Payment -> methods of payment.













you can also click setup button to select any other File Format.

Now the scenario is there is requirement that you need your custom define method of payment for example creating sales orders in csv file format while generating the payment as i show in above images.

So what you have to do is create two classes like this:

CustOutPaymRecord_YourClass inherit this class from CustOutPaymRecord

CustOutPaym_GlobalInt inherit this class from CustOutPaym

The CustOutPaymRecord_YourClass  must contains the output method.In that method you will right the logic to get the sales orders and write them in the csv file.like this.

















Other than that you can also override the checkValues method if you want to validate any thing in the LedgerJournalTrans table basically this method is calls before the output method from standard AX classes.

You will also have to override the interfaceName() method in your CustOutPaym_yourClassName class to give the name of your Export Format like this:











Basically the text that you define in that method will be shown as export file format on the dialog while generating the payment or on the setup form when you select the export file format.

Other methods that you need override are:


























above method is use for taking file format as an input.






























You can also check the existing standard Ax classes that contains the file format method like above.

Name of the class will same as i have mentioned above like this:

CustOutPaymRecord_YourClass inherit this class from CustOutPaymRecord

CustOutPaym_GlobalInt inherit this class from CustOutPaym

Let me know if you have any questions.

Thanks,
Muhammad Zahid.


3 comments:

  1. Thank you for your post. Hawkscode Uk is the leading IT service provider. Hawkscode Uk
    is website development company.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. How can we do it in new version Dynamics 365? I would like to use a GER configuration already done.

    ReplyDelete