Skip to content

Fix composite tree test: remove referenceId from nested child records#90

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/sub-pr-71
Draft

Fix composite tree test: remove referenceId from nested child records#90
Copilot wants to merge 2 commits intomainfrom
copilot/sub-pr-71

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 4, 2026

The test_bridge_composite_tree_operation integration test was failing with INVALID_FIELD - No such column 'referenceId' on sobject of type Contact. Salesforce's Composite Tree API only accepts referenceId on parent records, not nested children.

Changes

  • tests/wasm-test-plugin/src/lib.rs: Removed referenceId field from nested Contact record in test_composite_tree function

The corrected structure:

let tree_req = CompositeTreeRequest {
    sobject: "Account".to_string(),
    records: vec![json!({
        "attributes": {"type": "Account"},
        "referenceId": "account1",  // ✓ Parent record only
        "Name": account_name,
        "Contacts": {
            "records": [{
                "attributes": {"type": "Contact"},
                // referenceId removed - not supported for children
                "LastName": contact_last_name
            }]
        }
    })],
};

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Base automatically changed from claude/adapt-agent-standards-KzMkw to main February 4, 2026 04:17
Co-authored-by: jlantz <1697127+jlantz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add WASM bridge for sandboxed Salesforce API access Fix composite tree test: remove referenceId from nested child records Feb 4, 2026
Copilot AI requested a review from jlantz February 4, 2026 04:24
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants