Notifications
Announcements
No record found.
Hi,
I want one of the user groups to go different form when they click on "go to origin" button from their notification window.
Thanks,
*This post is locked for comments
AX normally looks for a display menu item with the same name as the referenced table. Nevertheless if it has a value in FormRef property, this value is used instead. Obviously it can't be set differently for a different users.
Your could override jumpRef() method on forms, but if you would have to do it in all places where the key field is used, which may be a problem. I would try to avoid that if I was you.
What I would recommend is to implement the menu item to point to a class instead of any form. You can then implement any form-selection logic there. Don't forget to pass the Args instance to the forms.
Hi Martin,
Thanks for the reply. I was thinking something simple. this looks somehting messing up with the code.
would you provide me some simple steps to achieve the above task.
Thanks again,
Which solution did you choose and what's the help you need?
I was looking somwhere in the button 's override method to redirect the user to a particular form.
eg: I've two forms i.e. form1: PurchTable and form2: PurchTable_Test
now if user x clicks on button "go to origin" then it should open PurchTable form (form1)
if user y clicks on button "go to origin" then it should open PurchTable_Test form (form2)
Aha, my fault, I thought you meant "Go to main table" feature. All right, so either override click() on the button or use a menu item button pointing to a class. There you can use MenuFunction class, to open a target of a menu item. Example:
MenuFunction mf = new MenuFunction(menuItemDisplayStr(Xyz), MenuItemType::Display); mf.run(new Args());
Thanks for the quick reply.
As you know this button "go to origin" has action menu item 'EventContextdrilldown'. I want in that class to put my piece of code if it is Purchase order then it should check the user and based on user it opens either PurchTable or PurchTable_Test.
Problem here in this class I couldn't able to find where it actually evaluates for PurchTable.
Please help.
No, I didn't know you talked about any particular button - that "my notification window" means the standard form for events is new information for me. It would help if your original question was more detailed.
In this case, the selection logic is implemented in EventContextInformation class. Walk through createFormMethod() in debugger to see what happens there. You still may be able to use what I said about the menu item, i.e. PurchTable menu item would point to a class with form-selection logic.. If not, you'll have to change the logic in EventContextInformation - check whether alertBuffer.TableId == tableNum(PurchTable) and use your new form name instead of the standard one when appropriate.
Worked like a charm.
Thank you
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2