Quantcast
Channel: CRM Development Forum
Viewing all articles
Browse latest Browse all 888

need an idea regarding MergeRequest message....

$
0
0

hi all,

Using a console application I need to merge records,

code

               MergeRequest merge = new MergeRequest();

                merge.Target = new EntityReference(Account.EntityLogicalName, new Guid(guid1));
                merge.SubordinateId = new Guid(guid2);
                Entity ent = new Entity("account");
                merge.UpdateContent = ent;
                merge.PerformParentingChecks = false;
                MergeResponse response = (MergeResponse)service.Execute(merge);

The code is working properly(i.e., the record with guid2 is getting deactivated). But I also need if the target's field(say email field) is null or empty and the subordinate record's field(email field) is having some value, the later once value need to be populated to the Target......

Any ideas???


Viewing all articles
Browse latest Browse all 888

Trending Articles