+ Start a Discussion
SandyMedaSandyMeda 

SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'SalesforceIqDataSource' is not supported.: []

We have apex classes through which we send emails based on user action in force.com sites. It was working great until Friday, But yesterday when one of our customer try to submit application, they were getting error, In debug it says “SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'SalesforceIqDataSource' is not supported.: []”. I am pretty sure we did not change anything related to apex class, email template, vf page etc.. Does anyone know the reason or best way to fix this?
Best Answer chosen by SandyMeda
Signagelive DevelopmentSignagelive Development
Following on from Andrew's comment about Salesforce whitelisting the SalesforceIqDataSource for the site guest user I put in a ticket with Salesforce Support explaining the situation.

They whitelisted the SalesforceIqDataSource object for the site guest user for our organisation and I can confirm this has resolved the issue for us.

Therefore, for anyone still encountering this issue I was advise that you do the same thing and raise a ticket with Salesforce support.

Thanks everyone for the support on this.

All Answers

Danny DowellDanny Dowell
Sandy, 

We ran into this exact same issue starting a week or so ago and we haven't been able to figure it out either. We have 4 apex classes in our org that send emails out during execution, and now one of those classes triggers this exception everytime. Oddly enough, the other 3 aren't affected. We did notice that the issue sprang up after the salesforce automated user installed a managed package called "SalesforceIQ Inbox". We manually removed the package and recompiled everything, but the package is just auto installed again days later. What makes the situation even more frustrating is that there is no documentation that I can find of "SalesforceIqDataSource" anywhere on the internet. 

I hope somebody can figure this out, because I've been banging my head against the wall for over a week now.

Danny Dowell
mkaufmanmkaufman
We've got the same situation.  Apex class that has not been touched in a long time has a method that sends an email and now it doesn't work.  We do have Einstein Activity Capture enabled, so that's probably it, but Apex is supposed to be locked in at the version it is written, so this shouldn't happen.
Danny DowellDanny Dowell
mkaufman, good call! As soon as I disabled the activity capture the emails were working again. However, I am interested to know why that would cause our one specific apex class to break, and why the capture was enabled for months and didn't break until the automated bot added SalesforceIQ Inbox behind the scenes as a managed package. 

Thank you.
SandyMedaSandyMeda
Thank you Danny and Mkaufman for your response. Good to know its EAC(Einstein Activity Capture) that is causing the issue. But in our organization, we need to keep EAC active for other users. For now I commented the email triggering code and our customers were able to finish the application and we are handling emails separately, so at least that is good. But in long run, I think this needs to be fixed. I reached out to salesforce support on the same day as I was confident that, this is not our code/developer issue, I will share this thread. Let see what they have to say! And Danny, I hear you and I was in same situation banging my head! -Sandy Meda
Danny DowellDanny Dowell
Sandy,
An alternative to commenting out the code would be to add a second argument to the sendEmail method call. If you pass a false boolean value to that second parameter, everything outside of the email will execute as is without triggering the SalesforceIqDatasource exeption. Then, if salesforce can correct the issue at hand, your code would resume its normal email functionality without any of your devs having to un-comment the block. 
SandyMedaSandyMeda
Good to know, I will try that, Thanks Danny!
Signagelive DevelopmentSignagelive Development
Just to try and raise some awareness our organisation has encountered the same issue.

Unfortunately, our commercial team use EAC to automatically capture customer interactions so this can not be disabled but our accounts team is not receiving certain payment notifications because of this issue.

If anyone finds a solution to this problem It would be greatly appreciated.
Andrew DunnAndrew Dunn
We are still experiencing this issue with Einstein Activity Capture. Has anyone found any workarounds that would allow the emails to be sent out? We are seeing the error "UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'SalesforceIqDataSource' is not supported" when trying to send emails from our package.
Signagelive DevelopmentSignagelive Development
I haven't been able to find a viable workaround or solution to this problem that doesn't involve either disabling EAC or not sending the emails. It is still happening and this seems to be the only mention of it anywhere that I have seen. Really need Salesfore to aknowledge and resolve this issue but in the grand scheme of things it seems to be effecting a very small number of users/developers so I am not sure how likely that is.
Andrew DunnAndrew Dunn
Signagelive - Agreed. We are still trying to work with Salesforce Partner Support on this issue to see what can be done to resolve the problem. Some of our customers can't disable EAC for business reasons so we are hoping to resolve this sooner than later. 

If we hear anything from Salesforce regarding a fix, will be happy to post it here.
Signagelive DevelopmentSignagelive Development
Thanks, Andrew that would be great.
Andrew DunnAndrew Dunn
We also started a thread on the partner community regarding this issue. It looks like one company was able to have Salesforce whitelist the SalesforceIqDataSource to the site guest user in the back end and that did the trick.

We are waiting on confirmation from Salesforce regarding if this will resolve the issue we are experiencing as well and what the steps each of our customers should take to have Salesforce whitelist the SalesforceIqDataSource to the site guest user.
SandyMedaSandyMeda
Andrew and Signagelive,

Did you guys try Danny suggested approach? I have n't tried yet as we already changed our approach by then, but may be worth trying if not already.

"An alternative to commenting out the code would be to add a second argument to the sendEmail method call. If you pass a false boolean value to that second parameter, everything outside of the email will execute as is without triggering the SalesforceIqDatasource exeption. Then, if salesforce can correct the issue at hand, your code would resume its normal email functionality without any of your devs having to un-comment the block. "
Signagelive DevelopmentSignagelive Development
Andrew, thanks for the update that is really useful to know.

Sandy, I havent actually tried this as my takeaway from that suggestion was that the email won't actually send but the exception will be somewhat handled and therefore any code after the email will execute. While that is an improvement if you have code after sending the email that needs to run it doesn't solve the problem of the email not sending.
Signagelive DevelopmentSignagelive Development
Following on from Andrew's comment about Salesforce whitelisting the SalesforceIqDataSource for the site guest user I put in a ticket with Salesforce Support explaining the situation.

They whitelisted the SalesforceIqDataSource object for the site guest user for our organisation and I can confirm this has resolved the issue for us.

Therefore, for anyone still encountering this issue I was advise that you do the same thing and raise a ticket with Salesforce support.

Thanks everyone for the support on this.
This was selected as the best answer
Bob NagyBob Nagy
We are seeing the same issue but its happening to users with full blown SF licenses, not Sites Guest Users.  
Andrew DunnAndrew Dunn
Bob.

Do you use apex classes to send the emails? If so, you may also need to have SF Support whitelist SalesforceIqDataSource. Every customer of ours that ran into this issue had to whitelist SalesforceIqDataSource for the site guest user and then the issue was fully resolved. 

Sadly this is still an ongoing problem as new customers of ours also need to reach out to SF Support to have them whitelist SalesforceIqDataSource for the site guest user.
Bob NagyBob Nagy
Andrew.

Yes, its apex code in a managed package that sends emails.  Don't know if the customer is using Sites but the users that encounter the error are full license SF users, not Sites Guest Users.  I can have ask the customer if they are using sites.  If they are and have multiple sites, and thus multiple Site Guest User accounts, do all of them have to be whitelisted?  

I have posted the issue on the SF Partners site also.  Will report back here if they respond.

Thanks so much.
Himanshu sonkarHimanshu sonkar
This problem is also happening with me my website is this-
Todaythinking.com  (https://www.todaythinking.com/sandeep-maheshwari-quotes/)



 
Himanshu sonkarHimanshu sonkar
This is my Hindi website. You will also find interesting posting along with entertainment
Todaythinking.com (https://www.todaythinking.com/)
Himanshu sonkarHimanshu sonkar
Digital India Portal can get all the digital information implemented by the Indian Government from this website
digitalindiaportal.org (https://www.digitalindiaportal.org/)
Tayah MaddenTayah Madden

I have tried the methods available on Google but none of them works fine if anyone have got the solution then please share it here. 

Here is the link that I am following : https://hindimesahayta.in/khatrimaza-download-hd-bollywood-south-hindi-dubbed-hollywood-movies/

Suraj AroraSuraj Arora
Please visit my site Airtel Prepaid Customer Care Numbers (https://airtelcustomercarenumbers.in/airtel-prepaid-customer-care-numbers/)
new user 81new user 81
Please check my site all type love,sad,emotional status,shayari, image shayari, best quality and status, image, Free Free Free  https://www.shayariblogs.com  (https:// https://www.shayariblogs.com )
Alex sandro 1Alex sandro 1
If you like to know all kind of apk files, tamilrockers new link join us(Bdtechsupport (https://bdtechsupport com))