Reg:Account Status changed to “Terminated” then that record should be read only.
Please help me on one more issue,I have requirement that is whenever Account Status changed to “Terminated” that record should be read only.But the twist is that after saving the record only the record becomes read only.
So I have done the changes as below
Function BusComp_PreWriteRecord()
{
try
{
Var Sapp=TheApplication();
Sapp.SetProfileAttr(“WriteRecord”,”Y”);
}
Catch{}
Finally
{}
}
Am Using this value as below:
Calculated
TRUE
caluclatedvalue
IIF([Status] = “Terminated” and TheApplication.GetProfileAttr(“Writecord”)=”Y” , “Y” , “N”)
I know all of you understood the problem with this code; Yes you are right that it is working for only one session not for all. whenever the session is closed before modified Terminated record should not be read only. Those records are coming to normal state as before. Please could you suggest me how could I resolve this issue.