I am trying to inactivate a record through PowerApps using the standard Status field:
Patch(
Employees,
LookUp(
Employees,
pre_employeeid = SelectedEmployee.EmployeeId,
{statecode: 'Status (Employees)'.Inactive,
statuscode: 'Status Reason (Employees)'.Inactive}
)
);
When running this (through OnSelect of button), I get an error: "statecode: The specified column is generated by the server and can't be specified."
I am not sure if statuscode is required in the patch but added it so the code and reason would align. Is there a different way I should be going about inactivating a record through the app?