I have a field in my contract line entity that is locked by the system as shown here:
I want to update this field using a plugin via the following code:
//Update Contract Line StartDate
Entity updatedContractLine = new Entity("contractdetail")
{
Id = entity.Id
};
updatedContractLine["activeon"] = startDate;
service.Update(updatedContractLine);
Would this work? If not, how can I make it work?
Field behavior - Field is read-only:
This helps to render the form control in disabled mode. Just related to user experience.
Locking - Lock the field on the form:
This just locks the attribute in the form editor from being removed from the form by Developer/Customizer. Just related to design mode.
In a nutshell, those properties has nothing to do with sdk update. You can update any attribute including activeon
which is not marked as read-only by SDK. For Ex. CreatedOn, allotmentsoverage, etc are Read-only properties. Read more