Hello,
I have an entity called Student with two attributes - an OptionSet field called Status and a Lookup field called Faculty.
On a record update (Post-Op) I'd like to trigger a plug-in whenever the Status changes to a certain value.
The record to be updated has a Faculty attached to it already.
My code is as follows -
Entity studentTarget = context.InputParameters["Target"] as Entity; new_student student = studentTarget.ToEntity<new_student>(); if (student.Contains("new_faculty") && student.new_Faculty != null && student.new_Status.Value == 3) {
// some logic
}
But the Faculty attribute returns null.
P.S. When registering a new step to the plug-in , in Filtering Attributes, I included both Faculty and Status attributes.
What could be the problem here?
Is it because the Faculty doesn't change that the attribute returns null? If so, how can I resolve this problem?
Thank you