How to Disable the Edit button in X++


Disable the Edit button if the Transaction status is Approved in X++
Fortunately some approved transactions also users can modify it; we have multiple options to disable those type of transactions.
Below is one of the methods, which can be able to disable those types of unwanted transactions,

If(purchtable.documentstate == versioningDocumentState::Approved)
{
listpage.actionPaneControlEnabled(formControlstr(PurchTableListPage, EditButton),false);
}
else
{
listpage.actionPaneControlEnabled(formControlstr(PurchTableListPage, EditButton),True);
}


Remaining methods will share you on the next article...!

2 comments:

  1. This is great advice! Very honest and practical.I really enjoyed this post.Nice post!! these tips may help Great post, Jo! My favorite work advice.Thanks so much for a detailed post! It is very helpful for.Your post is helpful to avoid the mistakes. For Microsoft Dynamics AX services contact Dynamics Square.

    ReplyDelete
  2. Hi, their colleagues, nice paragraph and nice arguments commented here, I am really enjoying by these.
    pdusu bcom 1st year result 2021-22 name wise

    ReplyDelete