Tuesday, 30 August 2016

alternativekeys and upsert in mscrm2016

UPser Functionality Using  in Mscrm 2015
===================================================================

if the record is  dere in database  it will update if record is not presented it will  create record in mscrm2016


Entity Accounts = new Entity("new_event");
     
        Accounts.KeyAttributes = new KeyAttributeCollection
        {
            {"new_valueb", "RAVIs" }
        };
        Accounts.Attributes["new_name"] = "DemoValues";
       // service.Update(Accounts);
        var request = new UpsertRequest() { Target = Accounts };
        var response = (UpsertResponse)service.Execute(request);

No comments:

Post a Comment