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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to open detailed view of a newly created record

(0) ShareShare
ReportReport
Posted on by

I have created a sample form which works like the Customer form, and my requirement is: -

When Create Customer form opens and we Save the new customer details, the detailed view of newly created customer opens up. In my case, when I Save the new sample form, the detail view does not open up, instead it shows the list of all records created. I want to open the detailed view of newly created object, just the way it opens up in the Customer form.

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Paridhi Gupta,

    You need to create a new menu item button and map the details form. You can refer to customer form - You will have three options one will be ok, other will be save and open and cancel button.

    When you click "save and open" button it will open details form for you.

    Refer to the form "DirPartyQuickCreateForm".

    Thanks,

    Girish S.

  • Paridhi Gupta Profile Picture
    on at

    Thanks for the reply Girish. I have extended the dirpartyquickcreateform and used it in my custom form. I want to open the detail view when we click on Save button, instead of Save and Open. Save button is a command button. How should I proceed?

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    In that case you need to call the details form in the closeOk method of the form.

    Override the closeOk method of the form and add the below code.

    public void closeOk()
    {
        Args args;
        Object formRun;
        
        args = newArgs();
        args.record("caller record");//you can pass the customer id to it.
        args.name(formstr(YourDetailsFormName));
        formRun = classfactory.formRunClass(args);
        formRun.init();
        formRun.run();
    }

    Thanks,

    Girish S.

  • Paridhi Gupta Profile Picture
    on at

    The above method was not working for me.

    Instead, I found out that there is a method called setContext() on the customer form which was performing the required task. Using that method, I was able to open the detail view of the new record on saving. So, adding the setContext() method helped solve my problem.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans