
1 respuesta
pass object from process builder to apex-:
replace sobject in below code with your custom object name
public class DefaultEntitlementAction
{
@InvocableMethod(label='Update Object' description='Update object')
public static void updateField( List<Sobject> listObject) {
List<Sobject> listofObject=new List<Sobject>();
for( Sobject obj1:listObject)
{
if(obj1.FieldA!=null)
update here
else
update here
Add items to list
listofObject.add(obj1);
}
//update the list out of loop
update listofObject;
}
}
i dont know your object and field name , therefore i have used dummy object and field names. let me know if you are still facing issues