CRM 7.2b
I've got 2 escalations created. The first one checks to see if there biddate field not null (the toggle value is 0 or null), then it emails people the date and toggles the oppo_biddatecal value so it doesn't repeat. I've also added the set column value so that oppo_biddatecompare gets the date/time from oppo_biddate (I think the code is right?)
SQL trigger
oppo_type = 'projectprebid' AND
oppo_biddate IS NOT NULL AND
(oppo_biddatecal = '0' OR oppo_biddatecal IS NULL) AND
oppo_status = 'In Progress'
Actions:
Create apt
Email interested parties
Set column value, oppo_biddatecal = 1
Set column value, oppo_biddatecompare = biddate
(In the create script I have this code oppo_biddatecompare = oppo_biddate;)
The second escalation is for someone changes oppo_biddate, then it will notify all people involved in the opportunity, and set the comparable field to the new field (to prevent it from looping indefinitely)
oppo_type = 'projectprebid' AND
oppo_deleted IS NULL AND
oppo_biddate IS NOT NULL AND
oppo_biddatecal IS NOT NULL AND
oppo_status = 'In Progress'
Actions:
Email interested parties of date change
Set column value, oppo_biddatecompare = oppo_biddate
(In the create script I have this code oppo_biddatecompare = oppo_biddate;)
The catch is that in the Trigger SQL I'm trying to tell it that if oppo_biddatecompare does not equal oppo_biddate to execute. What code might be best here?
oppo_type = 'projectprebid' AND
oppo_deleted IS NULL AND
oppo_biddate IS NOT NULL AND
oppo_biddatecal IS NOT NULL AND
oppo_status = 'In Progress'
AND oppo_biddate IS NOT oppo_biddatecompare?
or maybe
WHERE oppo_biddate IS NOT oppo_biddatecompare?
Any help is appreciated!