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)

Mailing List

(0) ShareShare
ReportReport
Posted on by

Hi,

Does anybody know of a way to make the mailing list section within a contact mandatory. We need to make sure that a contact cannot be saved without a mailing list of some kind being ticked (there is an option for no mailing list at all).

Thanks.

*This post is locked for comments

I have the same question (0)
  • Wayne Walton Profile Picture
    13,730 on at

    Subgrids can't be made mandatory out of the box.  

    You could put a field on there called "added to mailing list" and make that mandatory, but that would only still only be honor system that they actually did so.

    For proper enforcement, you would need a plugin that checked for the existence of a child record.

  • Community Member Profile Picture
    on at

    Thanks! That's really helpful.

  • Suggested answer
    Piotr Kerner Profile Picture
    285 on at

    Hi,

    You cannot add anything to a subgrid unless you create the main record first, so the subgrid could be mandatory only after the contact is created.

    Next, what you could do is to verify if any record was added to the subgrid (see script below) and show an error when there are no rows:

    The following script will allow you to verify if you have any records attached: Xrm.Page.getControl("subgrid_name").getGrid().getTotalRecordCount();

    Of course plugins are always an option, but that was mentioned already.

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