Skip to content

Instantly share code, notes, and snippets.

@rodriguezartav
Created February 28, 2015 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodriguezartav/6ab902a63262d94c514a to your computer and use it in GitHub Desktop.
Save rodriguezartav/6ab902a63262d94c514a to your computer and use it in GitHub Desktop.
Script para crear SubfamiliaVentas__c
List<Producto__c> productos = [select FamiliaNombre__c, Familia__c, Subfamilia__c, SubfamiliaVentas__c from Producto__c where Activo__c= true];
for( Producto__c producto : productos ){
Set<String> familias = new Set<String>{ '55' };
if( producto.FamiliaNombre__c=='Yale' && familias.contains( producto.Subfamilia__c ) ){
producto.SubfamiliaVentas__c = 'Digital';
}
}
update productos;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment