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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans