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

Hide Default edit button of the Form

(0) ShareShare
ReportReport
Posted on by 110

I want to hide the default EDIT button on my customized form "Purchase order created by me", I changed all data sources allow edit property to NO, also I set the ViewEditMode property on design to View but the button is not hiding I also tried to put the code on Run() method but it is not affecting too, here is my code.

 public void run()
    {
        super();

        //To hide the edit button on form.
        this.design().viewEditMode(enum2int(ViewEditMode::View));

        if (RetailSMB::IsRetailSMBEnabled())
        {
            RetailUtils::HidePart(element, identifierStr(PurchEncumbranceSummaryPart));
        }
    }

I have the same question (0)
  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    Can you try before super

  •  Muhammad Bilal 17 Profile Picture
    110 on at

    I did nothing happens

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Muhammad Bilal,

    Did you duplicate the existing Purchase order form to create the customized form?

  •  Muhammad Bilal 17 Profile Picture
    110 on at

    Hi Gunjan,

    Yes exactly.

  • ergun sahin Profile Picture
    8,826 Moderator on at

    Hi Muhammad ,

    Did you delete or comment on standard codes. It contains "viewEditMode" in some standard codes such as PurchTableInteraction and PurchTableInteractionhelp

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at

    Hi Muhammad,

    Have you tried to set the Max access right property on the data source to View?

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 565 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