viernes, 13 de septiembre de 2013

CRM 4.0 - Listar los atributos necesarios para crear una entidad (Fuente David Jennaway)

David Jennaway

It's not something I've ever done, though the SDK documentation implies
it should be possible. You will definitely need the domainname, and
I think you must have the businessunitid. You must also ensure you don't
pass any of the attributes marked as ValidForCreateAPI = 0 in the metadata


Lista de atributos de una entidad validos para crear

select *
 from MetadataSchema.Attribute where EntityId In (select EntityId from MetadataSchema.Entity where Name='systemuser')
and ValidForCreateAPI <> 0



Lista de atributos de una entidad validos para crear y obligatorios

select *
 from MetadataSchema.Attribute where EntityId In (select EntityId from MetadataSchema.Entity where Name='systemuser')
and ValidForCreateAPI <> 0 and AttributeRequiredLevelId = 'required' and DefaultValue is null

No hay comentarios:

Publicar un comentario