You need to sign in to do that
Don't have an account?
Carlos Cicero
Invalid id error when recieved as parameter
Hi Everyone,
I am getting the error Invalid ID aHS5C000000KykJWAS, but it seems to be only when received as paramenter from Auracomponent.
I check the data type in javascript and it is a String.
public static void sendEmail( String whatId ) {
Id what_Id = Id.valueOf(whatId); //This does't work for my custom object only
Id what_Id = Id.valueOf('aHS5C000000KykJWAS'); //This work for my custom object
I have tried in serveral ways, but it make no sense. Let me know if you know what is going on.
Thanks,
Carlos
I am getting the error Invalid ID aHS5C000000KykJWAS, but it seems to be only when received as paramenter from Auracomponent.
I check the data type in javascript and it is a String.
public static void sendEmail( String whatId ) {
Id what_Id = Id.valueOf(whatId); //This does't work for my custom object only
Id what_Id = Id.valueOf('aHS5C000000KykJWAS'); //This work for my custom object
I have tried in serveral ways, but it make no sense. Let me know if you know what is going on.
Thanks,
Carlos
Your ask seems similar to https://salesforce.stackexchange.com/questions/286035/first-exception-on-row-0-first-error-invalid-id-field-invalid-entity-type-for
Try
mail.setSaveAsActivity(false);
If this information helps, please mark the answer as best. Thank you