AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
CRM
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.09.2021, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1414: Enforce unique email but ignore inactive records
Источник: https://crmtipoftheday.com/1414/enfo...inactive-users
==============

Alternate keys are great way to enforce uniqueness of the column values. For example, if you want lead emails to be truly unique, just add an alternate key and no user will be able to bypass that (unlike the duplicate detection which is a fairly timid mechanism). The challenge is when you want that uniqueness to apply only to active records. Bear with me.

You thought that lead was lost forever and deactivated the record (you do not ever delete important records, right?). Now they are coming back, rejuvenated and refreshed and ready to buy not one but seven of your wonderful Jigamagigs. New lead is created but with the same email and that’s OK – we don’t hold grudges. What you don’t want is two active leads with the identical emails.

Alternate key using email are not going to work for you in this scenario, but you can enforce the uniqueness using a faux column that contains email for active records and null for inactive.
It works because alternate keys ignore null values.

The walkthrough below uses the contact table.

<ol>Create a column large enough to hold email addresses. No need to make it searchable or enable audit.
Create new real-time workflow (and you can do that from the new solution explorer)
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1400: Excluding inactive records from duplicate detection Blog bot Dynamics CRM: Blogs 0 03.02.2021 18:11
crmtipoftheday: Tip #1299: Split email personalities Blog bot Dynamics CRM: Blogs 0 02.09.2019 14:11
crmtipoftheday: Tip #1254: Design Dynamics 365 email templates with the new email editor Blog bot Dynamics CRM: Blogs 0 17.04.2019 05:18
crmtipoftheday: Tip #1026: Change your perspective on tracking email Blog bot Dynamics CRM: Blogs 0 20.11.2017 09:11
crmtipoftheday: Tip #1018: Automatically create Dynamics 365 records from Social Engagement Blog bot Dynamics CRM: Blogs 0 08.11.2017 18:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра
Комбинированный вид Комбинированный вид

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:58.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.