RE: Form creation by MD
MD
Thu Feb 22 17:21:34 CST 2007
You can use JScript for the OnSave event, which would populate a custom field
with a piece of, or all of the Record's GUID.
The name of the field should be New_EntityNameId, where "EntityName" = the
name of your Custom Entity.
The JScript you can use to retrieve the Record's GUID is something like:
var LookupStr = crmForm.all.EntityName.DataValue;
var StrText = LookupStr[0].name;
crmForm.all.New_YourField.DataValue = StrText
//Where "YourField" = the name of your custom text data field
This should write the GUID into your custom field. Keep in mind that when
you create this new String field you should set the legnth to 38, as all GUID
are (I think) 38 characters long.
HTH
"Tony shovel" wrote:
> This is the scenario:
> 1. I'm an absolute newbie to CRM 3.0
> 2. We're trying to create a new form in order to register Customer on site
> service registration.
> 3. Everything worked fine (lookup fields, relationships etc.) untill we had
> to create a field with an auto generated number or code to univocally
> identify the registrtion and represent a search key. We thought let's get the
> primarykey attribute (ID) but could find a way to add it to the form. And
> some other attempt ........
>
> Question:
> How could we solve this issue?