There are a couple of tricks to working with SetState and SetState Dynamic plugins. To get the State that the record is "becoming" you can check the InputParameter "State":
var state = (OptionSetValue) context.InputParameters["State"];
localContext.Trace("Contact State: " + state.Value);
if (state.Value == (int)ContactState.Inactive) return;
To get the Guid of the record, check the PrimaryEntityId property:
Guid targetId = context.PrimaryEntityId;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment