Code Monkey home page Code Monkey logo

Comments (1)

codeulike avatar codeulike commented on July 27, 2024

Hi Ajay

This is a tricky one because if you are transferring related objects you need to come up with something which will work for all levels of the hierarchy.

One thing you might be able to do is add a custom field specifically for marking the 10 accounts you want to transfer to sandboxes. I.e. you create a new field called Help_Sandbox_Data_Set__c on Account and then filter Account like this:

<SbbObject ApiName="Account" Filter="Help_Sandbox_Data_Set__c = true" />

For the next level down, say Contact, you can reference the same field on the parent Account object:

<SbbObject ApiName="Contact" Filter="Account.Help_Sandbox_Data_Set__c = true" />

If you can't add a field then another way of doing this - which is a little weird - is to catch a subset of records by doing a 'like' on a numeric field. You can't use the actual salesforce 'Id' in this way but if you have some other numeric ID-style field you might be able to do:

<SbbObject ApiName="Account" Filter="Internal_Reference__c like '%38'" />

... where the 38 is a random selection of digits, but in general doing like '%38' will return roughly 1% of the records. If you chose 3 random digits like '%384' you would get 0.1% of the records, and so on.

Then at the next level down, you do it again, referencing the parent field like this:

<SbbObject ApiName="Contact" Filter="Account.Internal_Reference__c like '%38'" />

Hope that helps.

from sandboxberry.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.