I have several vendors which we do a lot of business with. I would like to add a button to the VendEditInvoice form for each of these vendors to default some values into a new invoice. I know that clicking a button fires a recordLeave event causing table level validation, so I need to set the saveRecord parameter on the VendID field to false. The problem I'm running into is that unless there is a value in the VendID field, the button click event doesn't seem to fire. The frustrating part is that the VendID is one of the fields I'm trying to set through the button click. So the real question is, why does the lack of a value in the required field seem to cause the button click not to fire? Any thought as to what I could be doing wrong? Any other thoughts to solutions to business requirements?
Thanks in advance for your thoughts.
Leave the field properties alone but set the button's "saverecord" property to false. You may also be experiencing some debugging issues, sometimes the UI elements don't trigger breakpoints - so for good measure try putting a print or info statement in the button click method to verify if the code is firing or not.
Dynamics AX MVP | My Blog | Sikich | Twitter @JorisdG
Joris and others,
I fell victim to a classic debugging problem... I wasn't looking early enough in the execution plan. Thanks again for your attention.
Joris, Thank you for your prompt reply. You are absolutely right the save record property is on the button. Also, the breakpoints are not firing. I have used infolog to see if the button click fires with no response. I have used the print /pause combination to see if the event fires with no luck. it doesn't seem to fire without a value in the vendID field. Any other suggestions?