Found this blog entry made by Kamal. The entry explains how to use the SysInfoAction classes. I played around with this classes and found out that you can get pretty specific when referring the user to the source of the info message.
This is a simple job that produces an info box that gives the user the option to open a form and edit a specific field on a specific record:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | static void FO_SysInfoAction(Args _args) { CustTable custTable = CustTable::find("4001"); SysInfoAction_FormRun SysInfoAction; ; SysInfoAction = SysInfoAction_FormRun::newFormnameDesc( "CustTable", "Edit record"); SysInfoAction.parmControlname("Address_City"); SysInfoAction.parmCallerBuffer(custTable); info("Go and edit specific field.","", SysInfoAction); } |
parmControlname is the name of the specific control in the CustTable form design that we want to edit, parmCallerBuffer is of course the record that needs to be edited.
Last 5 posts in Development
- No valid document identified from the entity key - April 9th, 2010
- Using Regular Expressions in Dynamics AX - October 2nd, 2009
- Create class and methods in x++ - December 22nd, 2008
- Simple field lookup in form - October 13th, 2008
- Get your Intercompany CustAccount - September 29th, 2008
I get the code to work as described above, is there a way to determine if they click close vs. the new button field that is added?
I don’t know if this is the answer you are looking for. But if the user clicks on the “Edit record”(or double clicks on the info image with the arrow) button, they will call the run method on the SysInfoAction_FormRun class. If they press Clear or Close they will not.