+ Start a Discussion
lebasieglebasieg 

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
Manoj DeshmukhManoj Deshmukh
Hi lebasieg ,
Can You Please Tell me what is your Scenario.
lebasieglebasieg
Thank you Manoj!
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. 
lebasieglebasieg
Nobody focusing the same problem?
Ruari LambertRuari Lambert
Was just speaking to Support on this in relation to trying to acheive the same result with process builder and they dsaid it was a current limitation of the object. I can auto create the record but no auto relate it to the contact which created it. anyone have any workaround ideas? Seems pointless to add the object if the use of it is so manual.
Shaijan ThomasShaijan Thomas
HI Lebasieg

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
lebasieglebasieg
Thank you very much Thomas!
The API version was lower than 42. Changed it and the error dissapeared :-)