cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
T1ago
Helper I
Helper I

How to identify what Contact is deleting a record?

When editing a record, with metadata option to set the value on save, I can set the contact that edited the record. How can the same be done when deleting a record? Doesn't seem to be an option for it, since I need to check via plugin who's doing so.

 

I need to be able to validate whether the contact deleting a record has permission to do so via plugin.

1 ACCEPTED SOLUTION

Accepted Solutions
OliverRodrigues
Super User
Super User

@T1ago this is probably what you are looking for: http://oliverrodrigues365.com/2022/05/04/power-apps-portals-identify-portal-user-via-plug-in/

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

View solution in original post

6 REPLIES 6
Johnnyg
Community Support
Community Support

Hi T1ago,

You could set workflow for contact when 'Record is deleted'. While the plugin ask belongs to Dynamics CRM Customization part. I would recommend to migrate the post in CRM Community: https://community.dynamics.com/crm 
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/workflow-proce... 

Johnnyg_0-1650808278254.png

 

Best Regards,
Johnny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Fubar
Solution Sage
Solution Sage

Rather than deleting directly, either 

  • Deactivate with a field set to indicate it was a delete (basically still doing an update with metadata to still update the Contact performing the operation), and then delete based on the flag.
  • Create a related record with a lookup to the record to be deleted (and capture the contact in metadata) then on create of that 'helper' record delete the record in the lookup. Whilst not captured against the record being deleted itself you end up with a list of 'helper' records indicating a delete operation occurred and by who.

Hi @Johnnyg ,

Can the contact from Portals be retrieved in the workflow? I can't find a way to get to it

Hi @Fubar ,

The problem here is the delete control can no longer be on the list.

Always have to open the record and edit it, and in this case the only interaction is adding or removing that record, so editing it and set a flag to delete will be a bit lame. But it seems like the only alternative I have.

OliverRodrigues
Super User
Super User

@T1ago this is probably what you are looking for: http://oliverrodrigues365.com/2022/05/04/power-apps-portals-identify-portal-user-via-plug-in/

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

@OliverRodrigues ,

Great, this is the way to do it.

 

I ended up adding a string field (since it doesn't work directly with the record) to keep the contact guid and pass it when updating the record with a flag like @Fubar had suggested.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Top Solution Authors
Users online (5,520)