Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

Before Purchase order - Product receipt posting, which method get called from which class ?

Posted on by 5,885

Hi,

Can you please let me know  Before Purchase order - Product receipt posting, which method get called from which class ?

Please give me more shed on this. 

Thanks!

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,696 Super User on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Hi @rp@n,

    I think we are now back at the start of your question. What is "before OK clicked"? On dialog open? After update of a certain control? Or automatically when the user did not do anything in 20 seconds?

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Hi Andre,

    8662.S1.jpg

    is this PurchFormLetter_PackingSlip is right class to do ? 

    Please give me more shed on this.

    thanks!

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Hi Andre,

    Please reply on this.

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Hi Andte,

    As you mentioned,  if posting field is enabled then only actual posting will start after clicked ok on posting dialog.

    As per my business requirement ,

    I have to perform before Product Recepit posting.

    That means , my code should get execute before ok clicked in posting dialog .

    Is it correct?

    Kindly let me know,  which class I needs to do the code?

    Please help me on this.

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Thanks Andre and Martin

    Kindly let me know in which class I need to do the code?

    Pls help me on this.

    Thanks!

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,696 Super User on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Hi @rp@n,

    The product receipt number is mandatory. Before just filling this field and click on OK, you might review other settings on this form first. If the 'Posting' field is unchecked, it will only generate a pro-forma for printing purposes, but will not do the actual posting. If this field is enabled then, indeed, the posting will start.

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Thanks Martin,

    Specifically,  if i am talking about PO - product receipt

    1,2 - In posting dialog, we have to mentioned Product receipt number then we clicked on ok. Then actually posting will start.

    Am I correct ?

  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    I'll answer your questions, although they seem to be missing the point.

    1. Yes, but don't forget that posting can run even without any dialog.

    2. No. The posting hasn't even started when you close the dialog. It's the same as with any other RunBase/SysOperation process with a dialog. You first collect inputs in a dialog, save data to variables (a contract in case of SysOperation) and only then you start the actual process.

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Thanks Martin,

    Don't worry on the Updating LedgerDimension ( main account ). They already have setup  etc...

    They only asked me to find the correct place to write code.

    please confirm the below things...

    1. before opening the posting dialog - If i wrote something , is considered as before posting.

    2. After closing the posting dialog - If I wrote something , is considered as after posting

    Is it correct?

  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    RE: Before Purchase order - Product receipt posting, which method get called from which class ?

    Hmm, it sounds to me like that you don't need to do anything before posting. You seem to want to change the way how ledger posting works. For some reason, you don't want to use the account configured for this type of posting and you want to take the value from somewhere else. Can you explain why, please?

    Also, your code suggests that you want to control the logic based on a field on PurchTable. This may be a problem if you're doing a summary posting of orders that have different setup, i.e. they should be posted to different accounts. Think about it.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans