When calling InsPolicyService:cancelPolicy , the service returns:
{
"errorCode": "INVOKE-500",
"error": "Field <custom field> is not editable"
}
The cancelPolicy service internally:
1. Queries the InsurancePolicy record using the fields defined in the Ins_GetPolicyDetails Field Set
2. Modifies the Status and related lifecycle fields
3. Performs an UPDATE DML on the record including all queried fields
If any field in Ins_GetPolicyDetails is a formula field, Step 3 fails because Salesforce does not allow formula fields in UPDATE operations.
Remove all formula fields from the Ins_GetPolicyDetails Field Set:
1. Navigate to Setup → Object Manager → InsurancePolicy → Field Sets
2. Open Ins_GetPolicyDetails
3. Identify any formula fields in the "In the Field Set" section
4. Drag the formula field(s) back to the "Available for the Field Set" section (or remove entirely)
5. Click Save
**Note: Removing a field from the Field Set does not delete the field. It only excludes it from being queried and updated by the managed service. The formula field remains available for page layouts, reports, and other purposes.
005387143

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.