Feeds:
Posts
Comments

Archive for October, 2008

//Create an array to set as the DataValue for the lookup control.
var lookupData = new Array();
//Create an Object add to the array.
var lookupItem= new Object();
//Set the id, typename, and name properties to the object.
lookupItem.id = ‘{1AAC1363-01A1-DB11-8432-0003FF9CE217}’;
lookupItem.typename = ‘account’;
lookupItem.name = ‘A Bike Store’;
// Add the object to the array.
lookupData[0] = lookupItem;
// Set the value of the lookup field to the value of the array.
crmForm.all.parentaccountid.DataValue = lookupData;

Read Full Post »

The name of default crm logo is ‘masthead.jpg’ which is located under directory ‘_imgs’ of the crm web folder. Rename this file to, say, masthead_backup.jpg and put your company logo and name it as ”masthead.jpg’. Done!

Read Full Post »

I’ve been doing quite a bit of scripting from the global menu bar lately and I’ve found a great post by Huib Aarts on some global variables that you can leverage in your client-side javascript. I’ve found a few more of these variables that can provide some use. Here’s a full list of the variables I reference:

  • SERVER_URL: This variable stores a string that specifies the base server url – the server name along with the organization name. Example: http://servername:port/organization
  • USER_LANGUAGE_CODE: This variable specifies the LCID value for the language pack used by the user. For English, this would be 1033.
  • ORG_LANGUAGE_CODE: This variable specifies the LCID value for the organization’s base language. For English, this would be 1033.
  • ORG_UNIQUE_NAME: This variable stores a string that specifies the current organization’s name.
  • ORG_DATE_START_DAY: Represents the first day of the week specified for the organization (0 = Sunday, 1 = Monday, etc).
  • IS_LIVE: Boolean value to specify whether the deployment is a CRM Live deployment.

Also, if you ever find yourself needing to utilize arrays to store days and months, why not just use the ones already created by CRM? Note that these arrays are available on the entity form, so if you have javascript on the global menu bar, you may not be able to access them:

  • LOCID_ARRAY_SHORT_MONTHS: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,
  • LOCID_ARRAY_LONG_MONTHS: January,February,March,April,May,June,July,August,September,October,November,December
  • LOCID_ARRAY_SHORT_DAYS: Sun,Mon,Tue,Wed,Thu,Fri,Sat
  • LOCID_ARRAY_SHORTEST_DAYS: Su,Mo,Tu,We,Th,Fr,Sa
  • LOCID_ARRAY_LONG_DAYS: Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday

Read Full Post »