web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to redirect to a different form when I click on "go to origin" button from my notification window.

(0) ShareShare
ReportReport
Posted on by 1,443

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

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    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.

  • Mirza Mujib Ur Rahman Baig Profile Picture
    1,443 on at

    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,

  • Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    Which solution did you choose and what's the help you need?

  • Mirza Mujib Ur Rahman Baig Profile Picture
    1,443 on at

    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)

    Thanks again,

  • Suggested answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    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());
  • Mirza Mujib Ur Rahman Baig Profile Picture
    1,443 on at

    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.

  • Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    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.

  • Suggested answer
    Community Member Profile Picture
    on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans