cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bik
Regular Visitor

Portal Entity List - Call workflow - Update Modified by with Portal contat

Hello all 

 

I have a Entitylist that calls various workflows, The issue I have is  I want the Modified by to be the user who is logged in the portal rather than "SYSTEM",  or is there a way I can trap the event to populate a field in the entity and then the workflow runs.

 My workflow is set to run as the user who makes record change.  it is a simple workflow that sets the status to whatever I need .

 

Thank you all in advance.

 
 

Regards

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Bik,

 

The idea would be to create another entity that is just used to fire the workflows. This entity would be related to the entity that you actually care about, as well as to the contact that created it (i.e. kicked off the workflow).

 

For example, let's say you wanted to run a workflow on an account. Instead of using the run workflow option, create another record type called "Kickoff Workflow". This entity would be related to the account, so you could create it from the entity form. You can then capture the user the created the record, which is the contact that wanted to start the workflow.

 

Your workflow would actually fire on the create of the Kickoff Workflow record, at which point you've got the reference to the account, and the contact that you are looking for.

 

Hope that makes sense.

 

Nick

View solution in original post

3 REPLIES 3
nhayduk
MVP

Hi Bik,

 

Unfortunately there is no quick fix for this. All operations that are performed by the Portal are done via the CRM SDKs, which are in the context of a user in CDS. Users on a Portal are contacts, and so have no ability to access those APIs directly.

 

The only solution I'm aware of that will get you the user experience you are looking for is to build a companion app, which you can then call an action passing in the ID of the contact. If you don't want to go down the companion app route, the next best thing I can think of is linking off to another page that contains an entity form that creates a custom "Start Workflow" entity, and then using the technique I've described in this video to capture the contact that created the record:

 

https://www.youtube.com/watch?v=R_l_AXBJjxo

 

Hope that helps.

 

Nick

bik
Regular Visitor

Hi Nick

 

Thank you so much. I have done the way you have explained in the entity form and it works. Its just the running of the workflow which is a issue . Because there is no option to update the current portal user anywhere. 

 

I have not tried  to build a companion app.. Now sure how to do that but i will give it a read and see if i can pick up how to 

 

Thank you.

Bik

Hi Bik,

 

The idea would be to create another entity that is just used to fire the workflows. This entity would be related to the entity that you actually care about, as well as to the contact that created it (i.e. kicked off the workflow).

 

For example, let's say you wanted to run a workflow on an account. Instead of using the run workflow option, create another record type called "Kickoff Workflow". This entity would be related to the account, so you could create it from the entity form. You can then capture the user the created the record, which is the contact that wanted to start the workflow.

 

Your workflow would actually fire on the create of the Kickoff Workflow record, at which point you've got the reference to the account, and the contact that you are looking for.

 

Hope that makes sense.

 

Nick

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,894)