Created
February 28, 2015 17:15
-
-
Save rodriguezartav/6ab902a63262d94c514a to your computer and use it in GitHub Desktop.
Script para crear SubfamiliaVentas__c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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