Setting up a flag and should not be able to modify the particular records

hi All,

Can you help me in doing this.

I want to set a flag for particular fields and after setting a flag for a particular field that should not allow or edit a particular record in ax 2009

For eg( the Process is like (Journal Table form → In this there ll be a field called “In use” while that field is used no one can change or edit those records.)

Thanks In Advance…!!

Create one BaseEnum(Noyes- type) in journaltable

once flag executed on particular fields update the baseEnum::Yes journaltable

goto the Journaltablelines(LineButton form)

here you will get the journal from journaltable.

journaltable = journaltable::findI(journaltable.journalid);

if (journaltable.baseenum == Noyes::yes)

{

grid.allowedit(false); // desing->set grid auto declaration to yes

}

esle

{

grid.allowedit(true);

}

You can set AllowEdit property of the form data source in its active() method (based on the value of the field).

hi buddies…

thx for yur replies…!!

But i want to know from beginning as step by step how to set a flag for particular field and followed by those process…!!

any one can guide me through achieve it…!!!

Thx…!!

form-ds-field1-

modified()

{

super();

table.NoyesID = Noyes::Yes;

}

======================

form-ds-field2-

modified()

{

super();

if(table.NoyesID = Noyes::no)

{

table.NoyesID = Noyes::Yes;

}

============================

form-ds-field3-

modified()

{

super();

if(table.NoyesID = Noyes::no)

{

table.NoyesID = Noyes::Yes;

}

}

hi pandu…!!

This should be done in form level DS… and under that enum overide modified method and this code should be written right…???

After This, whats the next process…!!!

under enum overide modified()

after that in Form level DS- active()

{

super();

if(Enum==Noyes::yes)

{

Table_ds.allowedit(false);

}

else

{

Table_ds.allowedit(true);

}

}

yae done with it pandu…!!!

Next Process…!!

No next required.You have done the task. do the proper testing.