cancel buttion work

Hi Friends ,

I have a form in this form having some fields , i can add cancel buttion in that form .

my requirement is when i click the cancel buttion what i have selected field in the form that field status should be canceled

and which having the status is canceled at that time cancel buttion will be disable

please some solution where i have to write code and which methods will work this requirement . i am new to this ax so please suggest fully

Hi Sreenivas,

write code on cliked method of cancil button

TableName.Satatus = Status::cancenled;

and write code in active method for disable cancle field

if (TableName.status == Status::cancel )

{

Buttoncontrol.enabled(false);

}

Do not forgot to make Autodeaclaration property to yes of cancel button.

Dear raj,

My requirement is whether status is created or approved (what ever it may be) after clicking the cancel buttion the status is canceled only

Regards,

Sreenivas

Dear sreenivas,

its very simple

if (TableName.status == Status::created || Status::Approved)

{

Buttoncontrol.enabled(false);

}