Retrieve Entity record data into plugin
var inputcontract = (localContext.InputParameters["Target"] as Entity).ToEntity<student_contract>();
// retrive entity data
Account accountEntity = localContext.OrganizationService.Retrieve(
Account.EntityLogicalName, inputcontract.student_Account.Id, new ColumnSet(new String[] { "student_eventseriesid" })).ToEntity<Account>();
// You can also set the value without entity context
["student_eventseriesid"] = accountEntity.GetAttributeValue<EntityReference>("student_eventseriesid")
Comments
Post a Comment