LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

SendHTML Email - sObject type 'OrgWideEmailAddress' is not supported

Open pcarass opened this issue 4 years ago • 8 comments

Hi @alexed1 , I'm using the SendHTML Email component, and it is working fine for myself. I am having an issue getting it to work for other users though. This seems to be caused when they initiate the screen flow and query the Org Wide Email address. Looks like they don't have access to it. The users Profiles have access to the specific email address that I'm querying for, so I'm not sure how else to debug this issue.

"Error element Get_Org_Wide_Email_Address (FlowRecordLookup). This error occurred when the flow tried to look up records: sObject type 'OrgWideEmailAddress' is not supported.. You can look up ExceptionCode values in the SOAP API Developer Guide."

Screen Shot 2020-04-09 at 11 59 40

Any thoughts on this? Cheers Paul

pcarass avatar Apr 09 '20 11:04 pcarass

@ericrsmith35 , Any ideas why this might be happening?

pcarass avatar Apr 11 '20 08:04 pcarass

I haven't used this component but I did find this link: https://success.salesforce.com/answers?id=90630000000guFBAAY

Eric

On Sat, Apr 11, 2020 at 4:56 AM pcarass [email protected] wrote:

@ericrsmith35 https://github.com/ericrsmith35 , Any ideas why this might be happening?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/317#issuecomment-612370841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHX4Y5FCAYIZEA4LBAYLRMAWDFANCNFSM4MEUOTDQ .

ericrsmith35 avatar Apr 11 '20 13:04 ericrsmith35

@pcarass have you tried the latest version of SendBetterEmail?

FYI @jdpond

adwhite75 avatar Dec 28 '20 16:12 adwhite75

Just came across this issue myself and the reason is because OrgWideEmailAddress cannot be queried by standard users

Special Access Rules Only authenticated users with the View Setup and Configuration permission can access this object.

I think the only way around this is to hardcode the ID unfortunately. Good thing is however this ID appears to be consistent across sandboxes

hwong103 avatar Mar 23 '21 02:03 hwong103

NIce catch. Will add to documentation. The answer would be to either create a new profile or add with a permission set. Longer term, maybe lookup on name rather than ID

jdpond avatar Mar 23 '21 18:03 jdpond

A workaround is to create a subflow with elevated access that grabs the Org Id

adwhite75 avatar Jul 14 '21 14:07 adwhite75

Will update documentation and close this

jdpond avatar Oct 18 '21 13:10 jdpond

@adwhite75 Did we decide to close this or should I take a look at spinning out an OrgWideEmailAddress query (sub flow or apex running as system user)

jdpond avatar Oct 11 '22 03:10 jdpond