Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add ability to import RecordTypeId when RecordType.Name is present #1102

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

WillieRuemmele
Copy link
Contributor

What does this PR do?

if you export with a similar command data tree export --query "SELECT RecordType.Name, Name FROM Account
data:tree:import can now resolve the RecordType sub-reference correctly

NUTs weren't possible due to a manual step in the target org 😦

What issues does this PR fix or reference?

@W-4472514@

@WillieRuemmele WillieRuemmele requested a review from a team as a code owner October 25, 2024 16:42
@shetzel
Copy link
Contributor

shetzel commented Oct 25, 2024

QA
org1:

  • create RecordType on Account object
  • create a few Account records
  • sf data tree export --plan --query "SELECT Recordtype.Name, Name FROM Account"
  • sf project retrieve start -m CustomObject:Account

org2:

  • sf project deploy start -m CustomObject:Account
  • In org Setup UI, make the RecordType created in org1 available to Admin user
  • bin/run.js data tree import --plan Account-plan.json - ensure success
  • Also ran sf data query -q "select Recordtype.Name, Name from Account" and saw the imported data

@shetzel shetzel merged commit c970512 into main Oct 25, 2024
11 checks passed
@shetzel shetzel deleted the wr/imoprtRecordTypes branch October 25, 2024 21:03
@thvd
Copy link

thvd commented Nov 7, 2024

@WillieRuemmele Trying to understand here, don't get me wrong, very happy with this new improvement.

But what I don't understand is that this is implemented were we use the RecordType.Name field, what i would have found more logical is to use a combination of Namespace and DeveloperName field.
Will this current solution still work were record type are duplicated?

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.

4 participants