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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Validate whether an attachment is present or not while saving the entity record

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a scenario where I want to validate whether at least one attachment is present or not before saving the record. While saving, if attachment is not present, then it should stop the user from saving the record giving an alert popup.

If attachment is there, it should read the file and should create the record in the annotation entity.

Generally, the notes section which is used in MS CRM entities, will be enabled only after saving the record. However, I have to attach a file and do validation after the document has been uploaded before saving.

Note: I have the code to create the annotation record when file is validated after saving the record. 

Awaiting your responses and valid suggestions!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    attachments can be saved only after the record is saved.

    You can (for example) create a field (Record is valid Yes/No) and set initially to No. After the record is created you can check the update (by a plugin) and see if there is an attachment, when there is at least an attachment you set this field to Yes.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans