Marketing List History

why does text your ex back work and
How To Get Back With Your Ex Girlfriend or
How To Get Your Ex Back How To Get Your Ex Girlfriend Back

win back ex
Hot To Get Your Ex To Text You Back Girlfriend Back, funniest ways to get a girl back, etc.

Greetings guys,

Last week I worked on a very strange requirement to implement some kind of a marketing list auditing mechanism. The customer wants to be able to track which user added particular contact in a given marketing list.&

how to get your ex girlfriend back, get your ex girlfriend back.

make your ex girlfriend want you back

We Split U 7 Months Ago He Still Nott Sure To Get Back With Me

how to win your ex girlfriend back

free advice on how to make her want you back

How To Get Your Ex Back

how to gain trust with your girlfriend via text

how to get back your ex

How To Get My Ex Girlfriend Back

text your ex back

How To Get Your Boyfriend To Want To Be With You

get your girlfriend back tips

I Text My Ex Boyfriend

How To Get My Boyfriend Back

how can i get my ex girlfriend back

how to get over my girlfriend

How To Win Back A Woman

Text Your Ex Back

text your man back

lt;

br />Since the list <–> contact relationship is many-to-many and therefore the relations are stored in a third table (called ListMemberBase in this case), there is no event available to trigger a workflow or do something out of the box. Technically nor the list is updated neither the contact. Since I didn’t have much time to do this I decided to use database trigger to achieve the goal. Yes it is unsupported but it works very fast and nice so I decided to share it.
I first created a custom field of type ntext called Marketing List History (new_marketinglisthistory) on the Contact Entity. Added this to the contact form.
Then created the following trigger:

USE [XXX_MSCRM]
GO
/****** Object: Trigger [dbo].[trg_ListHistory] Script Date: 09/28/2010 17:09:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[trg_ListHistory]
ON [dbo].[ListMemberBase]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
if (select EntityType from inserted) = 2
begin
if (select New_MarketingListHistory from Contact, inserted where Contact.contactid=inserted.entityid) is null
begin
UPDATE Contact
SET New_MarketingListHistory = (select l.createdbyname+’ –> ‘+listname from listmember l inner join list m on l.listid=m.listid where l.ListMemberId=inserted.ListMemberId)
FROM inserted
WHERE Contact.contactid = inserted.entityid
end
else
begin
UPDATE Contact
SET New_MarketingListHistory = (select l.createdbyname+’ –> ‘+listname + char(13) from listmember l inner join list m on l.listid=m.listid where l.ListMemberId=inserted.ListMemberId) + (select New_MarketingListHistory from Contact where Contact.contactid=inserted.entityid)
FROM inserted
WHERE Contact.contactid = inserted.entityid
end
end
END

Done! Here is the result:

The last addition in a given marketing list goes on top of the history.
You can also put this column in the marketing list view – all members to look like this:

Regards!
Rinshwind

women having a babygetting pregnant a girl having a baby could i be pregnantmust have for baby

1 comment

  1. Your approach is nice and also works fast. To be honest, unsupported stuff sometimes is better than supported one, especially when it comes for user experience 🙂

Leave a comment

Your email address will not be published. Required fields are marked *