OnChangeScript
Specifies the JavaScript to run when the field value is changed.
This property is only applicable if the ReadOnly property is set to false.
Values
JavaScript to run. This must be a string value.
Examples
ThisPersonId = CRM.GetContextInfo('Person','Pers_PersonId');
ThisPersonRecord = CRM.FindRecord('Person','Pers_PersonId=17');
PersonBlock = CRM.GetBlock('PersonBoxLong');
FirstName = PersonBlock.GetEntry('Pers_FirstName');
FirstName.OnChangeScript = "alert('User's first name has changed')";
CRM.AddContent(PersonBlock.Execute(ThisPersonRecord));
Response.Write(CRM.GetPage());
Displays an alert when a user's first name has changed.