You need to sign in to do that
Don't have an account?
lebasieg
Hi! I get "Invalid type: Individual" in Contact or Lead trigger. It's an standard object. Can you help me with Individuals and GDPR? Thanks!
public static void insertIndividual(List<Contact> tNew, List<Contact> tOld){
try{
//
List<Individual> lst_indiv = new List<Individual>();
//
for(Contact con : tNew){
lst_indiv.add(FirstName = con.FirstName, LastName = con.LastName, Salutation=con.Salutation);
}
//
//
if(!lst_indiv.isEmpty()){
insert lst_indiv;
}
}catch(Exception exc){
LogHelper.generateLog('ContactMethods.insertIndividual()', exc, 'Trigger');
}
} //insertIndividual
try{
//
List<Individual> lst_indiv = new List<Individual>();
//
for(Contact con : tNew){
lst_indiv.add(FirstName = con.FirstName, LastName = con.LastName, Salutation=con.Salutation);
}
//
//
if(!lst_indiv.isEmpty()){
insert lst_indiv;
}
}catch(Exception exc){
LogHelper.generateLog('ContactMethods.insertIndividual()', exc, 'Trigger');
}
} //insertIndividual
Can You Please Tell me what is your Scenario.
We have enabled the new "Make data protection details available in record" in the Company Profile, related to the General Data Protection Regulation. From that moment, Individual Object is available in the organization.
We want a new Individual record created when a new Contact or Lead is inserted.
I would like to suggest 2 things
1. Verify the "We have enabled the new "Make data protection details available in record" in the Company Profile".
2. Verify the API version of the code, it should be 42.
Thanks
Shaijan Thomas
The API version was lower than 42. Changed it and the error dissapeared :-)