Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Is there a way to get the ID of the Record being deleted from the FormAssistant ??

Posted on by Microsoft Employee

I am writing a solution for Dynamics CRM 2013 and as part of that, we need to track deletion of Opps/Leads/Contacts/etc.  The path we have selected is to have our own "HistoryRecord" that simply tracks the Object Type and the ObjectGuid.  Our external system can read this table, to keep track of records that have been deleted (as well as cleanup the history records)

The problem is that I need the Record ID of the object being deleted.  So for Opportunity I have been using "{Opportunity(Opportunity)}" and assigning it into my "HistoryRecord.EntityId (String)" field.  However, this always seems to generate "Opportunity" instead of the actual GUID.

Is there a way to get the ID of the Record being deleted from the FormAssistant ??

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Is there a way to get the ID of the Record being deleted from the FormAssistant ??

    Thanks Guys - looks like a custom Plugin is my path forward.

  • Verified answer
    Inogic Profile Picture
    Inogic 24,094 on at
    RE: Is there a way to get the ID of the Record being deleted from the FormAssistant ??

    Getting GUID using the Form Assistant is not possible.

    But, you can use the Custom Assembly that can output the GUID of the record.

    HTH!

  • Verified answer
    nghieppham Profile Picture
    nghieppham 4,755 on at
    RE: Is there a way to get the ID of the Record being deleted from the FormAssistant ??

    Hi Acid,

    You can write plug-in to use the pre-image Delete messgae, then you can get recordId or any fields of deleted record and save to your custom History entity.

    You can refer this link for image support of message. xrmcenter.wordpress.com/.../key-notes-of-ms-crm-plugin-technology-for-beginners

    Regards,

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans