Monday, December 1, 2008

MS CRM 3.0/4.0 Form how to's

'Form' How to Tips:

 

1.   Change Field Required level: 

crmForm.SetFieldReqLevel( "" , true );  


2.  Check if the form has changed or not after it was loaded:

alert ( crmForm.IsDirty() );  



3.   How to bind javsscript event to form and controls:

for form - crmForm.attachEvent( "onsave" ,  methodName );  

for control – crmForm.all..attachEvent( "onclick/onblur/…" ,  methodName );  


4.   How to get Entity Object Type Code

alert(crmForm.ObjectTypeCode);  



5.   How to Retrieve Entity Schema Name

alert(crmForm.ObjectTypeName);  



6.   How to avoid dialog box that appears on the webform some times when u try to close the form

crmForm.detachCloseAlert();  

No comments: