Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

How to match entity's attributes and antityMetadata attributes? Some names mismatched

$
0
0

Hello.

I have entity Contact ( name = contact, type = Entity) in variable "entityObj".

I have array of attributes from Contact's metadata (based on type: AttributeMetadata)  named "AttrArray"

I want to set values from entity Contact's attributes ( = fields) to AttrArray.

Something like that:

AttrArray.ForEach( atribute =>
{
     var entityField=entityObj.Where ( g=>g.name = atribute.name );
     atribute .value = entityField.value;
});


It works, BUT !!!

Some fields (in entity Attributes and metadata  attributes) have MISMATCHED names! It's a problem.

Is there is a way to match that fields?

Mayby I have use othe objects ?

Thank you!

Exmaple:

Entity Contact: attribute "lastname"

MetadataAttribue:  attribute  "address1_name" (example)


Viewing all articles
Browse latest Browse all 79901

Trending Articles