Skip to content

feat(W-23687514): add --skip-assignment-rules to data create/update record - #1492

Merged
soridalac merged 7 commits into
mainfrom
k80/assignment-rule-header
Aug 7, 2026
Merged

feat(W-23687514): add --skip-assignment-rules to data create/update record#1492
soridalac merged 7 commits into
mainfrom
k80/assignment-rule-header

Conversation

@k80bowman

@k80bowman k80bowman commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a --skip-assignment-rules boolean flag to data create record and data update record. When set, the commands send the Sforce-Auto-Assign: FALSE REST header so records created or updated by these commands aren't reassigned by active Account, Case, or Lead assignment rules.

  • Unit tests cover the header being sent (or omitted) for both commands.
  • NUTs exercise the flag end-to-end against a scratch org seeded with a Case assignment rule and a TestCaseQueue.

What issues does this PR fix or reference?

@W-23687514@

Sends the Sforce-Auto-Assign: FALSE REST header so records created or
updated by these commands aren't reassigned by active Account, Case,
or Lead assignment rules.
Adds a Case assignment rule and TestCaseQueue to the test data project
so NUTs can verify the header suppresses reassignment end-to-end.
@k80bowman
k80bowman requested a review from a team as a code owner August 4, 2026 20:43

@jshackell-sfdc jshackell-sfdc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve the summary text, but had a question about the flag names.

Comment thread messages/record.create.md Outdated

Use Tooling API so you can insert a record in a Tooling API object.

# flags.no-assignment-rules.summary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, did you decide against --disable-assignment-rules? Boolean flag names should start with a verb.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Changed to --skip-assignment-rules as per discussion. Thank you!

Comment thread messages/record.update.md Outdated

Fields that you're updating, in the format of <fieldName>=<value> pairs.

# flags.no-assignment-rules.summary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@k80bowman k80bowman changed the title feat(W-23687514): add --no-assignment-rules to data create/update record feat(W-23687514): add --skip-assignment-rules to data create/update record Aug 5, 2026
@soridalac

Copy link
Copy Markdown
Contributor

QA notes:
Testing: use data-project and scratch org
✅ Verified --skip-assignment-rules on data create record and data update record against a scratch org with an active Case assignment rule routing to TestCaseQueue.

✅ Deployed assignment rule + queue metadata to scratch org
data create record without flag — Case reassigned to queue
data create record with --skip-assignment-rules flag— Case stays owned by running user
data update record without flag — Case reassigned to queue on subject change
data update record with --skip-assignment-rules flag — Case owner unchanged despite matching rule

@soridalac
soridalac merged commit fae509b into main Aug 7, 2026
32 checks passed
@soridalac
soridalac deleted the k80/assignment-rule-header branch August 7, 2026 19:27
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.

3 participants