Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

CustPackingSlipId creation

Posted on by 315

Hello,

When I use the SalesEditLines form, I want to know where in code the CustPackingSlipId is being generated.

Any help is most appreciated.

Thanks in advance.

*This post is locked for comments

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: CustPackingSlipId creation

    Debugging of server side code must be enabled in the AOS configuration. In addition to that, you can disable the "Execute business logic in CIL" checkbox in your user options.

    But even with those settings the debugger will not work with any asynchronous process.

  • NewWatermelon Profile Picture
    NewWatermelon 315 on at
    RE: CustPackingSlipId creation

    The debugger is perfectly working.

  • Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: CustPackingSlipId creation

    There is setting at user options level, see what's its set to. Is your debugger even working on anything else?

  • NewWatermelon Profile Picture
    NewWatermelon 315 on at
    RE: CustPackingSlipId creation

    Also, I put breakpoint at  SalesPackingSlipJournalCreate/getJournalNumber class method, but the debugger didn't go there either.

  • NewWatermelon Profile Picture
    NewWatermelon 315 on at
    RE: CustPackingSlipId creation

    I debugged closeOk method to the end and It didn't take me to any code related to PackingSlipId generation.

    But when I check manually CustPackingSlipJour table after SalesEditLines form closing, I find the new related PackingSlipId generated there!

  • Suggested answer
    Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: CustPackingSlipId creation

    Take a look at SalesPackingSlipJournalCreate class where field packingslipid is being assigned a value based on function that generates packing slip id (getJournalNumber).

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: CustPackingSlipId creation

    If that's too early, then clearly the packing slip generation doesn't happen on the form. Since the form closes after that line of code.

    Did you try to debug from the closeOk method onwards and see where it takes you?

    Usually debugging and cross references are the best ways to find out where something happens in the application.

  • NewWatermelon Profile Picture
    NewWatermelon 315 on at
    RE: CustPackingSlipId creation

    What I'm trying to achieve that I want to write code on the form where I would like it to be executed after PackingSlipId generation.

    i did write my code on the method closeOk() method after supre() but that seems to be early before PackingSlipId generation!

  • NewWatermelon Profile Picture
    NewWatermelon 315 on at
    RE: CustPackingSlipId creation

    I did as you said but the debugger didn't stop at that breakpoint.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: CustPackingSlipId creation

    Try to but a breakpoint in Tables\SalesParamaters\numRefPackingSlipId and debug it.

    Or check cross references for this method and you see all methods that call it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans