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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans