Loading
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

InsPolicyService:cancelPolicy Throws "Field Is Not Editable" Error When the Ins_GetPolicyDetails Field Set Contains Formula Fields

公開日: Jun 15, 2026
説明

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

 
読み込み中
Salesforce Help | Article