Hi all,
I have done a very simple Dexterity customization to the Sales Transaction
Entry screen in which the Master Number has been added to the group of
fields above the scrolling window. The customization involved placing the
Global field Master Number onto the window and setting properties as such:
AutoCopy - True
Editable - False
Required - False
SavedOnRestart - False
SetChangeFlag = False
TabStop - False
The problem is upon saving the sales order document, the master number is
always 0.
So, I decided to try a different approach. I removed the global field
Master Number and added a local field, then created a focus change trigger
for 'Display Existing Record' and wrote code to do a get table operation to
retrieve the master number from SOP_HDR_WORK. This also resulted in the
Master Number being 0, which I do not understand since there is no change
table or other table update being done.
By setting breakpoints in the script called by the trigger and looking at
local variables and the table buffer, I can see where the Master Number IS
correct when 'SOP Number' gets focus (and the document is "pre-saved") but
then gets overwritten with a value of 0 when the Save button is clicked.
Note that for existing sales order documents or documents entered by other
means (eConnect integration for example), the master number value is
displayed correctly.
If anybody can provide some insight into what I am doing wrong, I'd greatly
appreciated it.
Mike