I have designed a Autolaunched Flow which creates UserPackageLicense record in order to assign License for a managed package to a user.
Now I have designed a process on USER object on create/edit(No criteria), which will trigger the Autolaunched Flow as an immediate action which will create UserPackageLicense record which results in assigning the license to the user Automatically.
In Order to Create the UserPackageLicense there are 2 required field we need to populate. 1.UserId 2.PackageLicenseId
UserId
I am passing User Id from prcoess -to-> Flow variable and I am using that variable in flow to create UserPackageLicense record.
PackageLicenseId
For PackageLicenseId I am using Lookup in flow which will find the PackageLicenseId based on predefined Namespace Prefix of Package and I am using that id value as UserPackageLicense
But on update of user record I am receiving this error : " Workflow Action Failed to Trigger Flow The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301P***********. Contact your administrator for help. "
The same Flow & Process works perfectly for Account object instead of UserPackageLicense
I have also tried to create a process by using Scheduled actions instead of Immediate Action as given here .