June 29, 2007

Adding a reference to external .js file in your form

This code creates a new script element and inserts it into the head of the HTML document that defines the form:

st = document.createElement("<script src='http://<server>/<site>/<filename>.js' language='JavaScript'>");
h = document.getElementsByTagName('head');
h[0].insertAdjacentElement('beforeEnd',st);

Using this method to reference an external script in a production environment is unsupported because it introduces several areas for concern:

  • Transportability
  • External Site
  • Doesn't work offline
  • Future Upgrade issues
  • Possible Timing issues
  • Poor programming practice

June 27, 2007

How to set user's home page?

I got a request that all users of CRM must have their first page set to announcements.

Of course I could write a mail to all users requesting them to change their page in settings page to announcements, but this is a no no way.

So I searched the SQL database and found a user settings table in _MSCRM database. Just set the HomepageSubarea of the table UserSettingsBase to the value 'nav_news'.

So if you want to set announcements as a home page for all users just run the query:

UPDATE [UserSettingsBase] SET [HomepageSubarea] = 'nav_news', [HomepageArea] = 'Home'

Although it works in my installation, this is not a supported change, so you are doing it at your own risk. Do backup the database before messing with it. Just in case.

Renaming a (Customizable) Entity

Just changing the entity display name is not enough. There are more places where the name must be changed to fulfill customer's experience.

Areas that Need to be Changed:

  • Entity Name
  • Entity Form Labels
  • Entity View Names
  • Entity Attribute Display Names
  • System Messages
  • On-line Help Content
  • Reports

Some Areas Cannot be Changed

  • Platform error messages and messages that are displayed in Trace or the Event Log. These messages cannot be edited.
  • Strings added to the ISV configuration file.
  • User Manager component of the Microsoft CRM Deployment
    Manager tool. These strings cannot be edited.
  • Environment Diagnostics Wizard. These strings cannot be edited.

 

Basically changing the entity's name is a seven step process:

Step 1: Change Entity Name.
In the Entity Definition section, change the Name and Plural Name
to the new name.

Step 2: Edit Entity Forms and Views to Display the New Entity
Names.
Change Form Labels and View Names.

Step 3: Change Attribute Display Names for the Entity that is
Renamed.
Use Customize Entities tool to change attribute display names associated with renamed entity. This will update any other parts of the application that uses these attributes, such as View headings.

Step 4: Customize Messages and Strings Associated with
Entity that is Renamed.
Use the Customize Entities tool to customize messages and strings associated with the renamed entity.

Step 5: Publish Changes.
The Name of the entity in the Navigation Pane may not respond to the changes. The information in the SiteMap is cached on the browser. Users may need to press F5 to see the changes.

Step 6: Edit affected help Content to Display the New Entity
Name.
Manually edit entity names in help content and re-deploy the help content.

Step 7: Modify Affected Reports to Display the New Entity
Name.
Manually modify entity names in reports and re-deploy the modified reports.

June 26, 2007

Yay! I passed the exam!

Today I sucessfully passed the Microsoft exam called CRM 3.0 Applications.

The exam number is: CRM-30-423