SBX - Search With Button

SBX - Forum Post Title

CustPackingSlipId creation

Microsoft Dynamics AX Forum

J. Doe asked a question on 15 May 2019 7:30 AM

Question Status

Suggested Answer

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.

Reply
Suggested Answer

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.

Reply
J. Doe responded on 15 May 2019 7:55 AM

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

Reply
J. Doe responded on 15 May 2019 7:58 AM

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!

Reply
Suggested Answer

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.

Reply
Satish Panwar responded on 15 May 2019 10:28 AM
My Badges
Suggested Answer

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

Reply
J. Doe responded on 15 May 2019 12:51 PM

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!

Reply
J. Doe responded on 15 May 2019 12:54 PM

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

Reply
Satish Panwar responded on 15 May 2019 2:06 PM
My Badges

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

Reply
J. Doe responded on 15 May 2019 2:17 PM

The debugger is perfectly working.

Reply
Suggested Answer

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.

Reply
Suggested Answer

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.

Reply
Suggested Answer

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.

Reply
Satish Panwar responded on 15 May 2019 10:28 AM
My Badges
Suggested Answer

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

Reply
Suggested Answer

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.

Reply

SBX - Two Col Forum

SBX - Migrated JS