Is the user creating a new record?
crmForm.FormType == 1
Is the user updating an existing record
crmForm.FormType ==2
Is the user unable to update this record?
crmForm.FormType == 3
Is this record deactivated?
crmForm.FormType == 4
Is the user using the Quick Create form?
crmForm.FormType == 5
Is the user using the Bulk Edit form?
crmForm.FormType == 6
What is the unique ID for this record?
= crmForm.ObjectId
What type of record is this?
= crmForm.ObjectTypeCode
What type of record is this (Entity Name)?
= crmForm.ObjectTypeName
Is the user using the Outlook Client?
crmForm.IsForOutlookClient==true
Is the user using the Outlook Light Client?
crmForm.IsForOutlookLightClient == true
Is the user working On line?
crmForm.IsOnline==true
Have any fields in this form been changed?
crmForm.IsDirty==true
Archive for January, 2009
CRM Form Types
Posted in CRM 4.0 on January 27, 2009| Leave a Comment »
Get rid of “Do you want to close this window?”
Posted in CRM 4.0 on January 22, 2009| 1 Comment »
You might get a question when opening CRM in Internet Explorer. The question is:
Do you want to close this window?
yes no
This message does appear in CRM 4.0 only when you are using Internet Explorer 7.0 and you have enabled the application mode setting. Nevertheless, it is an anoying message which you can get away!
To get rid of this message open the default.aspx file which resides in the root of the CRM website. In this file there are these three lines of code:
oMe.opener = window.self;
oMe.close();
Modify the second line of this snippet and end up with these three lines:
oMe.open(”,’_self’,”);
oMe.close();
You now will not have the message anymore. Keep in mind that any update or migration might remove this change, but you should be able to reapply the change easily again.
How to rename area’s
Posted in CRM 4.0 on January 22, 2009| Leave a Comment »
Quite often I see the question “how do I rename an area in CRM v3.0?”.
I could write an own example, but Arne Janning already did so in the public community. Here’s his post:
In the CRM-web-client click –> Settings –> Customization –> Export Customizations –> mark Site Map –> More Actions –> Export Selected Customizations –> Hit OK on the dumb dialog.
You get a customizations.xml-file to download. In that file you’ll find five area-elements: Workplace, SFA, MA, CS, Settings. These areas define the top-level structure of the “Wunderbar” (the Outlook-style navigation).
This is an example for an area-element:
<area id=”SFA” shape=”RECT” coords=”0,0,0,0″ resourceid=”Area_Sales” icon=”/_imgs/sales_24x24.gif” descriptionresourceid=”Sales_Description”>
To customize this you could add the “Title”-attribute to overwrite the ResourceId:
<area id=”SFA” title=”Clients” shape=”RECT” coords=”0,0,0,0″ resourceid=”Area_Sales” icon=”/_imgs/sales_24x24.gif” descriptionresourceid=”Sales_Description”>The strucure of the sitemap is well documented in the SDK, which BTW has been updated and improved lately :o)
Client Programming Guide –> Navigation Configuration: SiteMap
Once you have finished your customizations in the sitemap you can upload the again:
Settings –> Customization –> Import Customizations –> select your file –> upload, publish and hit F5 to reload the Wunderbar.
Hope that helps.
Set a lookup to NULL
Posted in CRM 4.0 on January 22, 2009| Leave a Comment »
when you’re working in server side code:
Entity.Lookup = new Lookup();
Entity.Lookup.IsNull = true;
Entity.Lookup.IsNullSpecified = true;
this also works for customers:
contact.parentcustomerid = new Customer();
contact.parentcustomerid.IsNull = true;
contact.parentcustomerid.IsNullSpecified = true;
If you’re working in a client side javascript, then use this approach:
crmForm.all.lookupschemaname.DataValue = null;
Using the Advanced Find for FetchXML builder
Posted in CRM 4.0 on January 22, 2009| Leave a Comment »
You can just open the Advanced find page and build the query as you like. Then run the query to see if it returns the data as you wish it should. If you are satisfied with the results and you want to know what query was sent into the CRM Framework, then press F11 to get the address bar and enter this script and press enter.
If you get a warning about leaving the page, just press ‘ok’ and then the query which is sent to the framework opens up in a popup. Unfortunately you cannot select the text to copy and paste. But with Windows XP and Windows Server 2003 you can copy all text on the popup by clicking somewhere on the popup (not on the button “OK” ofcourse) and pressing ctrl+c. Now in notepad you can paste the text of the FetchXML.
Good luck!
Update: Thanks to Piotr in the comment section I have learned the javascript prompt command. Try this instead of the alert: