Skip to content

Instantly share code, notes, and snippets.

View anoop-76's full-sized avatar

Anoop Singh anoop-76

View GitHub Profile
@anoop-76
anoop-76 / MigrateProducts.java
Last active September 11, 2018 22:26
Sample Migration of Products, Pricebook and PricebookEntry records
public class MigrateProducts {
public void process() {
List<CommandVO> list = new ArrayList<CommandVO>();
list.add(new CommandVO("create", "Products.json"));
list.add(new CommandVO("create", "PricebookEntry_standard.json"));
list.add(new CommandVO("create", "PricebookEntry_nonstandard.json"));
MigrableObjectFactory.migrate(list);
@anoop-76
anoop-76 / fulfillment-object-mapping.json
Last active January 9, 2019 22:30
Fulfillment Object Mapping
[
{
"parent": "FulfillmentProvider__c",
"children": [
{
"parentMappedField": "FulfillmentProvider__c",
"childObject": "FulfillmentParameterDefinition__c",
"sequence": 1
}
],
@anoop-76
anoop-76 / object-relationship-json-mapping.json
Last active January 9, 2019 22:31
Object Relationship JSON Mapping
[
{
"parent": "Pricebook2",
"where": " IsStandard = false ",
"unmappedFields": ["IsStandard", "IsArchived"],
"children": [
{
"parentMappedField": "Pricebook2Id",
"childObject": "PricebookEntry",
"where": " Pricebook2.IsActive=true And Pricebook2Id != null And Product2Id != null ",
@anoop-76
anoop-76 / build.properties
Last active September 11, 2018 22:30
build.properties
# SOURCE
source.sfdc.login=username@salesforce.com
source.sfdc.password=******
source.env.endpoint=https://test.salesforce.com/services/Soap/u/41.0/
# TARGET
target.sfdc.login=username@salesforce.com.sandboxorg
target.sfdc.password=******
target.env.endpoint=https://test.salesforce.com/services/Soap/u/41.0/
@anoop-76
anoop-76 / JSON_Mapping_Description.csv
Last active February 3, 2023 03:09
JSON_Mapping_Description
Key Description
parent Api name of the parent object
externalIdField [optional]: If you have external Id field; you can declare them
where [optional]: You can filter the records using where clause
children [optional]: Array of children objects
refresh [optional]: Set this to true for hierarchical relationships
parentMappedField Api name of parent object relationship
childObject Api name of child object
externalIdField [optional]: If you have external Id field; you can declare them