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.

  • Paridhi Gupta Profile Picture
    on at
    RE: How to open detailed view of a newly created record

    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.

  • Suggested answer
    GirishS Profile Picture
    27,823 Moderator on at
    RE: How to open detailed view of a newly created record

    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
    RE: How to open detailed view of a newly created record

    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,823 Moderator on at
    RE: How to open detailed view of a newly created record

    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.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,129 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,895 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans