web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to identify what C...
Power Pages
Answered

How to identify what Contact is deleting a record?

(0) ShareShare
ReportReport
Posted on by 74

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.

Categories:
I have the same question (0)
  • Sutherland Profile Picture
    Microsoft Employee on at

    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-processes?view=op-9-1 

    Johnnyg_0-1650808278254.png

     

  • Fubar Profile Picture
    17 Super User 2026 Season 1 on at

    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.
  • T1ago Profile Picture
    74 on at

    Hi @Johnnyg ,

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

  • T1ago Profile Picture
    74 on at

    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.

  • Verified answer
    oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

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

     

  • T1ago Profile Picture
    74 on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 33

#2
sannavajjala87 Profile Picture

sannavajjala87 28 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 22 Super User 2026 Season 2

Last 30 days Overall leaderboard