How to know I can't set fullname?

How to know I can't set fullname?

Post by Grant Sche » Sat, 23 Jun 2007 22:04:47


Our C# .NET client application allows CRM records to be created as a result
of user actions. We allow users to specify several fields in the CRM record
to be set from external data. To allow support for custom fields and
entities we use dynamic entities. We use the entity and associated
attribute metadata to decide what fields to show to the user.

Now, in the case of creating a contact, they can tell us to populate a field
such as firstname or lastname or fullname. My question is about fullname.
While the create doesn't fail, no names show up. This makes sense as
fullname is actually derived from firstname + lastname. Is there some
metadata value associated with the attribute of fullname (and possibly
similar fields) which would allow my application to know not to allow my
users to try to set this as part of creating a new record?

Also, should I get some kind of failure? The record is created but with an
Unknown name (i.e., no name set.)


Grant Schenck

How to know I can't set fullname?

Post by GrandiJoo » Sat, 23 Jun 2007 22:43:50

Hi Grant,

When I read your post I became curious and looked at the entity
navigator: http://crm/sdk/mdbrowser/entity.aspx?entity=contact (where
crm is our specific crm installation).
The complete list can be accessed at http://<myserver>/sdk/list.aspx

There you can see all the attributes and relationships of the contact
entity. The last 3 columns specify whether an attribute is valid for
create/read/update. When a attribute is not valid for create you can
assume (I think) it is derived.
This data is retrieved from the metadata service:
you can use this service to get an up-to-date definition of the
attributes of your crm system.

Hope this helps to get you on your way.



How to know I can't set fullname?

Post by RGF2aWQgSm » Sat, 23 Jun 2007 22:47:00

Yes, the AttributeMetadata has a ValidForUpdate field which indicates whether
you can modify it.

You get the AttributeMetadata from calls to the MetadataService
David Jennaway - Microsoft Dynamics CRM MVP

How to know I can't set fullname?

Post by Grant Sche » Sun, 24 Jun 2007 00:21:02

Got it! Thank you both.