Skip to content

Unintended Record Deletions #1786

Open
Open

Description

@scottgrimes

I have found that when using the function conn.sobject("Opportunity")... the related record is being deleted when not instructed.

I've seen this happen when using .update and .find

Here is an example :

const oppUpdateBody = {
orca__Orca_Deal_Room_Id__c: unique_id
};
await sfConn.sobject("Opportunity").update({ Id: opportunity_id, ...oppUpdateBody });

forgot to add im using v3.10.8

Activity

  1. cristiand391 commented on Jan 28, 2026

    @cristiand391
    Contributor

    can you run the code with this env var JSFORCE_LOG_LEVEL=DEBUG and share the logs?

    conn.sobject.update should be doing an sobject PATCH as doc'd here:
    https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions