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 :
Microsoft Dynamics AX (Archived)

Blocking certain records in tables from being edited

(1) ShareShare
ReportReport
Posted on by

Hi,

We are using a third party POS module. We are working on a customization to check and approve the item master before pushing it to POS. We have designed a form, to display all the details of an item(like itemId, name, price, season, etc). The user will check these details in the form and select the item and click on an approve button designed on the form. Once he clicks this button, all the records in the respective tables corresponding to this item should be blocked from editing until the disapprove button on the form is pressed.

(i.e. The record in the pricedisctable corresponding to this item should be blocked for keeping the price unchanged.

The record in the inventTable corresponding to this item should be blocked for keeping various fields unchanged.  etc..  ) 

This blocking is required to ensure that the item details are similar on AX as well as POS.

Please help us figure out how to block the records in the table from editing until the disapprove button is pressed .

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Thanks Sukrut, that was useful. But the issue is that, there are many forms where these item details can be edited, so we were expecting to put a lock on the table level. If we put a lock on the table level we could prevent editing the record from any form.

    Is it possible to put a lock on the table level,rather than form level restriction.

  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    You may put your code on validate write method as Sukrub mentioned, however, it is usually called only from forms but not from code. There is another method called aosvalidateupdate that is executed for all sorts of update, so youmay put validation there as well. Please note that it will slow down all standard functionality because will have to check you flag for each update.

  • Community Member Profile Picture
    on at

    Thanks Sukrut.

    I have one more doubt. Will adding a new field in a standard table like InventTable affect the performance. We have around 8 standard tables in which we need to add the new field to block editing.

  • Community Member Profile Picture
    on at

    Hi Sukrut,

    Sorry to ask this silly question. I am new to AX.

    I have added the check box field as you said and now the checkbox is getting ticked when the approve button is pressed and unticked when disapprove button is pressed. But could you please tell me the command or the code that I need to add in the validatewrite method of the table to prevent editing when this checkbox field is set to yes.

    Thanks for you timely help.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans