Archives by Tag 'onload event'
CRM Common Javascript File
Need to reference an external javascript file to make functions available in change events and in an onload? Here’s how!
Click to continue reading
Click Here To View Post With Syntax Highlighting
Set a default email template for new emails on cases.
In response to Peter Bergman’s post on the CRM forums, I traversed Microsoft’s code. I determined that the ApplyTemplate loads a specific page, and on that page, the ok button sets the information on the calling page. I melded the ApplyTemplate and ok methods together to create LoadTemplate provided below. With the right parameters, it will set the default template.
Click to continue reading
Click Here To View Post With Syntax Highlighting
Get Current User’s Business Unit for Hiding Fields
In my previous post about hiding fields and tabs using roles, I outlined how use roles to hide fields, etc. Here is a modification of the method to hide sections by business unit.
Click to continue reading
Click Here To View Post With Syntax Highlighting
Hide Fields or Tabs by Role with Javascript
Do you need to hide fields or tabs based on security roles. Here is an easy way to add the functionality to your CRM, use my code example.
Click to continue reading
Click Here To View Post With Syntax Highlighting
Auto-Update Duration/End Time JScript
Sometimes you need to be able to have preset values, and have the duration auto-update. In this example, I will make the actual durations auto-update when one of the fields is changed. If the duration is changed, then the end date will be changed.
Click to continue reading
Click Here To View Post With Syntax Highlighting
Toggle Fields in a CRM form using Javascript
This script can be used to create a form in CRM that has fields appear based on a a radio (bit) yes/no. If yes, answer an additional question, if no, keep the other field hidden.
Click to continue reading
Click Here To View Post With Syntax Highlighting