Archive for February, 2008

Conditional Lookup on Primary Contact of an Account

Tuesday, February 19th, 2008

This Post is based on a Post from AdvantageWorks in which a Filtered Lookup between 2 Lookups is described. Hessel Miedema and I created a Version of the Lookup for the Primary Contact of an Account. We used the Account Name as input for the Search Box of the Lookup of the Primary Contact. (Be aware that your Account Names need to be Unique in this Case).

The main Reason for this Post is that we noticed that the “&” character is Not allowed in a URL Request, but is allowed as Search Value. The “&” character needs to be replaced by “%26″ to function properly. A list of characters can be found in the The extended ASCII table .

The example we used on the OnLoad of the Account:

crmForm.all.primarycontactid.additionalparams = 'search=' + crmForm.all.name.DataValue.replace("&","%26").replace("+","%2b");

Publish Entity after creating Workflow

Friday, February 15th, 2008

I have noticed that after publishing a Workflow on an Entity, the custom Client Side Code on the Form of that Entity not always works before publishing the Entity again.
After publishing the Entity everything (including the Workflow) works fine.

DO NOT USE NTEXT

Friday, February 8th, 2008

Today I learned something new. Not new to the world, but just new to me:
DO NOT USE NTEXT ! 
I don’t know why it is still possible to create ntext attributes in MS CRM 4.0, but I learned that in the real SQL world they are no longer used. Ok, you may still want to use it for field with more than 4000 characters, but in most crm systems this is not advisable.

Quote:
ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.”
Source: MSDN SQL Server Developer Center