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

  • Suggested answer
    Piotr Kerner Profile Picture
    285 on at
    RE: Mailing List

    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.

  • Community Member Profile Picture
    on at
    RE: Mailing List

    Thanks! That's really helpful.

  • Wayne Walton Profile Picture
    13,728 on at
    RE: Mailing List

    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans