úterý 28. března 2017

CRM 2015: Fill From field at activity entity with unknown email

Using Javascript:

var fromAtt = Xrm.Page.getAttribute("from");
var cp = { name: "unknown@email.com", type: "9206", category: 0 };
fromAtt.setValue([cp]);

put this code to onLoad method and that's it.

Result looks like:

In plugin there come fields:
"sender" : "unknown@email.com"
"from" : activityparty


in JSON:

{"Key":"sender","Value":"unknown@email.com"},
{"Key":"from","Value":{"Entities":[{"LogicalName":"activityparty","Id":"00000000-0000-0000-0000-000000000000","Attributes":[{"Key":"addressused","Value":"unknown@email.com"}],"EntityState":null,"FormattedValues":[],"RelatedEntities":[]}],"MoreRecords":false,"PagingCookie":null,"MinActiveRowVersion":"-1","TotalRecordCount":-1,"TotalRecordCountLimitExceeded":false,"EntityName":"activityparty"}}

In plugin you can manipulate this request as you want




Žádné komentáře :

Okomentovat