Create Settlement on payment journal creation- D365 FO / Ax2012

There are scenarios where we might need to create  settlement dynamically when a payment journal is created. As we are aware, SpecTrans is the table which is used for this requirement. This post gives an overview of the fields that are needed when this table is used for marking settlement.

As a first step, for our requirement a new payment journal is created with corresponding values. So how do we populate the values in SpecTrans which marks the settlement?This is where the fields SpecTransRecid/SpecTransTableId plays a role. These fields are mapped with the values of Tableid and RecId of the LedgerJournalTrans where the settlement is marked.

What is the use of the field RefRecid/RefTableId? In our scenario, the invoice and the actual settle amount are referred from the table CustTransOpen (from the relation CustTrans). So these fields have the values of TableId and RecId of CustTransOpen.

The field Balance01 denotes the amount that is being settled. If there is partial settlement , then this field has the value of settled amount.

Given below the code snippet which is used for Customer settlement.

SettlementCreation

Advertisements

About AnithaEswaran

Hello all, Thanks for visiting my blog. I started this blog to share my learning with Ax members . Since I am from technical background, most of my posts would be from X++. Thanks to my mentor and my colleague Romain who guided and helped me in learning many new concepts in Ax. This instilled confidence in me to handle and troubleshoot complex issues. Feedback wrt to my blog entries are most welcome …
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s