PROCESSLERİN .NET KODUNDAN ÇAĞRILMASI (.NET İÇERİSİNDEN İŞLEM YAPMA)
1.
PROCESSLERİN
.NET KODUNDAN ÇAĞRILMASI (.NET İÇERİSİNDEN İŞLEM YAPMA)
Linkler
http://www.c-sharpcorner.com/UploadFile/61cf58/using-actions-in-microsoft-dynamics-crm-2015/
Bu işlem için action(eylemleri) kullancağız. Zaten
eylemlerin processlerden pek bir farkı yok, sadece parametre alabiliyorlar.
Aşağıdaki kod bloklarında bm_actionname dediğimiz şey eylemimizin sistem
adı.Yayınladıktan sonra aşağıdaki kodlarda görüldüğü gibi kullanılabilir.
C#
OrganizationRequest orgReq = new OrganizationRequest("bm_actionname");
orgReq["Target"] = new EntityReference("account", new Guid("01DC64CE-0752-E511-80D8-000D3AA023B6"));
OrganizationResponse response = iService.Execute(orgReq);
OrganizationRequest orgReq = new OrganizationRequest("bm_actionname");
orgReq["Target"] = new EntityReference("account", new Guid("01DC64CE-0752-E511-80D8-000D3AA023B6"));
OrganizationResponse response = iService.Execute(orgReq);
Sample 2
1. //we have written method to get CRM service object
2. IOrganizationService service = connection.GetCRMService();
3. //retrieve account record using that we want to create contact
4. Entity accountObj = service.Retrieve("account", new Guid("699D9F32-9B10-E511-80FD-C4346BAD3138"), new ColumnSet(true));
5.
6. //Create organization Request object and pass action name as parameter
7. OrganizationRequest Req = new OrganizationRequest("bm_actionname");
8. Req["ParentAccount"] = accountObj; //passing our first parameter
9. Req["Salesperson"] = new EntityReference("systemuser", new Guid("90322292-C8EC-4A72-8B32-B79DEF7DD31C"));
10. //use execute method to call action
11. OrganizationResponse Respons = service.Execute(Req);
Yorumlar
Yorum Gönder