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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

How could I change the shown system defined button?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

>> Question:

How could I change the default system defined button of a form from "Save"(SystemDefinedSaveButton) to "Edit"(SystemDefinedViewEditButton) in code, to control the view/edit mode?

>> Background:

Basically, when we enter a new form, such as ledger journal, the system defined button shown on the left upper is "Edit" which we can click and change the form mode from view to edit mode, then the caption witl change from "Edit" to "Save".

But in some forms, the system defined button is "Save", thus we cannot manually change the form mode from view to edit mode.

pastedimage1676294638033v1.png    pastedimage1676294660972v2.png

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

    Hi Kai cheng,

    This property is setup on the menu item - There will be property named Open mode on the menu item properties - You need to change that to desired property you want.

    If you want to change save mode to edit mode - On the form >> Options tab >> Select Edit group >> Read mode - This will change the form from Save to Edit mode again.

    There is a another option which is specific to user - Navigate to gear icon on the top right corner - Select the gear icon >> Select User options >> Under preference tab - Set the Default view edit mode to desired values and check.

    Thanks,

    Girish S.

  • Kai Cheng Profile Picture
    Microsoft Employee on at

    Thanks a lot, Girish. You provided two useful ways to do from UI. But what I need is to revise it from code. Sorry that I didn't describe it clearly.

    I want to change the system defined button in code for a from, from "Save"(SystemDefinedSaveButton) to "Edit"(SystemDefinedViewEditButton).

    Take "Counting" journal for an example.

    Here is the FNO link: usnconeboxax1aos.cloud.onebox.dynamics.com/

    When you enter the Counting form, the button on the left upper is "Edit", here you cannot edit the records in the form as it is in view mode.

    After you click the 'Edit' button, the form changes to edit mode, and the "Edit" button will change to "Save" as well.

  • Verified answer
    GirishS Profile Picture
    27,833 Moderator on at

    You can extend the display menu item - But you cannot set the open mode property as the property was non editable.

    Only option will be setting it via code on form OnInitialized form event handler.

    Check whether the below code works for your scenario.

    [FormEventHandler(formStr(FormName), FormEventType::Initialized)]
    public static void formName_OnInitialized(XFormRun sender, FormEventArgs e)
    {
        FormRun fRun = sender as FormRun;
        fRun.setEditMode(false);
    }

    Thanks,

    Girish S.

  • Kai Cheng Profile Picture
    Microsoft Employee on at

    Thank you so much, Girish.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 1,093

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 193 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 159 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans