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));
}
}