Thursday, March 20, 2014

Debugging Dynamics GP - searching for messages

Figure out the message number
1. Search in Messages

2. SELECT * FROM SY01700
WHERE ERMSGTXT LIKE '%message text%'

Search for the message in the code
if you got it from Messages, then search for getmsg(MessageNumber)

if you got it from the SY01700 table, search for Warning_Dialog, MessageNumber

Look in = start with Selected Form, if you know which form the message is coming from for sure. Then search in All Dictionary Scripts if you still can't find it.

Example
Message text = "Quantities must be distributed before you can save this item."

Searched Messages, nope.

Executed SELECT * FROM SY01700
WHERE ERMSGTXT LIKE '%Quantities must be distributed before you can save this item.%'     

This returns the row with message number 33107. Since i got it from the table I then search for Warning_Dialog, 33107

First i limit the search to "Selected form". In this case it returned one script. So i know that's where the message is popping up
                                                                                                                                                                                         

No comments:

Post a Comment

There was an error in this gadget