alexed1 / LightningFlowComponents

A collection of unofficial Flow extensions that can be used to enhance Salesforce Flow and Orchestrator.
http://unofficialsf.com
Other
594 stars 583 forks source link

SendHTML Email - sObject type 'OrgWideEmailAddress' is not supported #317

Open pcarass opened 4 years ago

pcarass commented 4 years ago

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_EmailAddress (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 commented 4 years ago

@ericrsmith35 , Any ideas why this might be happening?

ericrsmith35 commented 4 years ago

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 notifications@github.com 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 .

adwhite75 commented 3 years ago

@pcarass have you tried the latest version of SendBetterEmail?

FYI @jdpond

hwong103 commented 3 years ago

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

jdpond commented 3 years ago

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

adwhite75 commented 3 years ago

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

jdpond commented 3 years ago

Will update documentation and close this

jdpond commented 2 years ago

@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)