Skip to main content
Dynamics 365 Community / Forums / Finance forum / Add new action when po...
Finance forum
Suggested answer

Add new action when post AP invoice journal

editSubscribe (0) ShareShare
ReportReport
Posted on by 782
Hi 
 
I try to add new action when post AP Invoice  journal ,the requirement is 
1- i created new 2 field in API parameter one for Account , and the second for offset account
2- when i click post by ultimately create 2 line in voucher by using account and offset account from parameter ( use the same fields in step one) if their is no error , continue the normal code to create the voucher,
after that when i open the voucher screen in the journal it's should 4 line fined 2 by using account and offset account from parameter and 2 by using by account and offset account i enter on journal.
so how i can do that.
 
//////
 
////
 
 
////
Categories:
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia on at
    Add new action when post AP invoice journal
    Hi,

    To add a new action when posting an AP Invoice journal, you can follow these steps:

    1. Create two new fields in the API parameter: One for the Account and the second for the Offset Account.

    2. When you click on "Post," you need to create two lines in the voucher using the Account and Offset Account from the parameter. If there are no errors, continue with the normal code to create the voucher.

    3. After creating the voucher, when you open the voucher screen in the journal, you should see four lines. Two lines will be created using the Account and Offset Account from the parameter, and the other two lines will be created using the Account and Offset Account entered in the journal.

    To accomplish this, you will need to customize the code or develop a custom extension to handle the additional logic and create the extra voucher lines.

    Best regards,
    Kevin

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,068 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,591 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans