0

I have created a Custom Notification Type called SMS Received.

I am calling it from a Flow, where I have insert the correct Id for it and provided all the params. When invoked from the Debugger, it works fine. However, when invoked from a Process triggered by a Platform event, I get an error:

Error Occurred: INVALID_TYPE: sObject type 'CustomNotificationType' is not supported.

Since it works from debugger (in Flow Builder), but not when called from a Process, I'm wondering if user context has anything to do with it? I tried without SenderId and also including the SenderId, set to the Admin's Id. Still doesn't work.

UPDATE__________________________

I have found in the past that if you have a Flow running, waiting for a platform event, after a month or two, it just stops and needs to be restarted. I suppose it reaches some limit on its logging. Therefore, I was trying to trigger the Flow from a Process instead, which seems more sustainable.

I changed the Flow, adding a Wait node waiting for the Platform Event that I previously had the Process waiting for. When I take the Process out of the solution, just running it from Flow, it works fine.

So the issue is, when you call the Flow from a Process, it can't access the CustomNotificationType. Must be user context related, but I'm not clear on why.

  • Did you check version of flow? If it's older one, then may not recognise this object. – Ayub Aug 28 '19 at 5:44
  • I created it fresh today, v46.0 – PatMcClellan__c Aug 28 '19 at 5:46
  • Never queried it simply...but as far as I know...It's part of tooling api ... if you simply query it...it would not be avialable – Ayub Aug 28 '19 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.