function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Katherine RoweKatherine Rowe 

Process Builder to use Custom Settings?

Can you reference a custom setting in a process builder process? For example, upon insert of a new Account, take the value in textfield1, look it up in the custom setting, take the corresponding field value in the cusotm setting, and write it back to textfield1.
Katherine RoweKatherine Rowe
Ok, how about I ask the question in a different way.

Below is my trigger code. Can I use process builder instead of a trigger? I suspect the process builder will have trouble with the custom setting portions (underlined below).
 
trigger DataDOTCOM_Account on Account (before insert, before update) {


/*
This trigger is to used to allow new Accounts to come from data.com into SF through data.com Prospector, otherwise there would be errors and it wouldn't work. Mandatory
fields and validation rules in SF need to be handled before data.com can save to SF.

*/

    for(Account a1: Trigger.new){
    
        //new accounts coming from data.com
        if(a1.jigsaw!=null & Trigger.isInsert){
    
    
            if(DataDOTCOM_Industry__c.getInstance(a1.Industry) != null){
                //set mapped industry value
                a1.Industry=DataDOTCOM_Industry__c.getInstance(a1.Industry).HSI_Industry__c;
            }
            
            
            for(DataDOTcom_LOB__c item : DataDOTcom_LOB__c.getAll().values()){
            
                if(a1.industry==item.HSI_Industry__c){
                    //set mapped LOB value
                    a1.Account_Intergraph_Line_of_Business__c=item.HSI_LOB__c;
                
                } 
            }
            
                        
            //giving the account a type of "prospect"
            a1.type='Prospect';
            
                //Since data.com sends address to Billing Address, this copies up to Physical address
               a1.Street_Address__c=a1.BillingStreet;
               a1.City__c=a1.BillingCity;
               a1.State_Province__c=a1.BillingState;
               a1.Zip_Postal_Code__c=a1.BillingPostalCode;
               a1.Country_Code__c=a1.BillingCountry;
               
               //clear out specifics of billing address so one assumes it's correct
               a1.BillingStreet=null;
               a1.BillingPostalCode=null;
               
               
        }
        
        //existing data.com accounts being updated by Clean
        else if(a1.jigsaw!=null & Trigger.isUpdate){
        
        
        }
    }
}