Skip to content

Commit

Permalink
Merge pull request #2 from dmgerow/cloning-logic
Browse files Browse the repository at this point in the history
Add Cloning Logic
  • Loading branch information
dmgerow authored Jun 23, 2017
2 parents 14ab6d8 + 31f981b commit e3d1998
Show file tree
Hide file tree
Showing 27 changed files with 75 additions and 110 deletions.
7 changes: 3 additions & 4 deletions src/workflows/Product2.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>Product2.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
9 changes: 4 additions & 5 deletions src/workflows/SBQQ__ContractedPrice__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -15,11 +16,9 @@
<name>Set_External_Id</name>
<type>FieldUpdate</type>
</actions>
<active>false</active>
<criteriaItems>
<field>SBQQ__ContractedPrice__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<active>true</active>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
6 changes: 2 additions & 4 deletions src/workflows/SBQQ__CustomActionCondition__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__CustomActionCondition__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
6 changes: 2 additions & 4 deletions src/workflows/SBQQ__CustomAction__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__CustomAction__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
6 changes: 2 additions & 4 deletions src/workflows/SBQQ__CustomScript__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__CustomScript__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__DiscountSchedule__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__DiscountSchedule__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__ErrorCondition__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ErrorCondition__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__ImportColumn__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &quot;:&quot; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ImportColumn__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__ImportFormat__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &quot;:&quot; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ImportFormat__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__LineColumn__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__LineColumn__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__LookupQuery__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__LookupQuery__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__OptionConstraint__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__OptionConstraint__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__PriceAction__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__PriceAction__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__PriceCondition__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__PriceCondition__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__PriceRule__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__PriceRule__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__ProcessInput__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ProcessInput__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__ProductAction__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ProductAction__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
7 changes: 3 additions & 4 deletions src/workflows/SBQQ__ProductFeature__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
<fieldUpdates>
<fullName>Set_External_Id</fullName>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<field>ExternalId__c</field>
<formula>$Organization.Id + &apos;:&apos; + CASESAFEID(Id)</formula>
<name>Set External Id</name>
Expand All @@ -16,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ProductFeature__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
5 changes: 1 addition & 4 deletions src/workflows/SBQQ__ProductOption__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ProductOption__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
6 changes: 2 additions & 4 deletions src/workflows/SBQQ__ProductRule__c.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
<type>FieldUpdate</type>
</actions>
<active>true</active>
<criteriaItems>
<field>SBQQ__ProductRule__c.ExternalId__c</field>
<operation>equals</operation>
</criteriaItems>
<description>Sets External Id to be the concatenation of the Org Id and the Record Id.</description>
<formula>OR( ISBLANK(ExternalId__c), AND(ISNEW(),ISCLONE()) )</formula>
<triggerType>onAllChanges</triggerType>
</rules>
</Workflow>
Loading

0 comments on commit e3d1998

Please sign in to comment.