Skip to content

fix(zoho-crm): send lookup field values as {id} object - #227

Open
csemazharul wants to merge 1 commit into
mainfrom
fix/zoho-crm-issue
Open

csemazharul wants to merge 1 commit into
mainfrom
fix/zoho-crm-issue

Conversation

@csemazharul

Copy link
Copy Markdown

Summary

  • Zoho CRM lookup fields (e.g. Account_Name on Deals) were formatted through the generic jsonobject branch of formatFieldValue(), which exploded the value and cast it to an object — sending {"0":"3644585000116662003"}.
  • Zoho rejected the record with MANDATORY_NOT_FOUND at $.data[0].Account_Name.id.
  • Scalar values for lookup fields are now sent as {"id": "<value>"}, matching the Zoho CRM insert-records docs. Array/object values keep the existing path.

Test plan

  • Map a record ID to Account_Name on the Deals module → deal is created and linked to the account
  • Non-lookup fields (picklist, text, date) are formatted unchanged

🤖 Generated with Claude Code

Lookup fields (e.g. Account_Name) were formatted via the generic
jsonobject path, producing {"0":"<id>"}. Zoho CRM expects
{"id":"<id>"} and rejected the record with MANDATORY_NOT_FOUND.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant