Hello!
I'm hoping someone has wrangled this procedure in the past and can help me troubleshoot - it appears that it's stopped running. In the recent past it ran each time a constituent record was updated - which was less than ideal in many ways - and along the way called another procedure which cleaned up any name and address data entry messes so that the contact information conforms to our consortium data standard.
In doing some related digging this week, I've found that it seems to be neither updating rank nor calling the cleanup function at the expected time. In looking at the trigger on T_CUSTOMER, as well as the code for LP_CUSTOMER_RANK, I don't see anything obvious that would be stopping it.
I should also note that I can't get LP_CUSTOMER_RANK to do what it should (update rank, at a minimum, plus call the other function) even when manually executing it through SSMS.
Any ideas where I should start?
Thanks!
Stacey Voigt
svoigt@granadasb.org
The plot thickens... or thins, depending on your point of view.
This is the statement that is stopping procedure from working. Is it needed? When would a customer number ever be null?
IF @customer_no is null BEGIN EXEC AP_SET_CONTEXT 'LockTrigger', 'N' RETURN END
IF @customer_no is null
BEGIN
EXEC AP_SET_CONTEXT 'LockTrigger', 'N'
RETURN
END
Everything works as expected when I comment this block out. Thoughts? Will I cause database Armageddon if I leave it commented out? Obviously I'm doing this in Test, but it's hard to simulate reality in a Test system that's only got a few users in it at a time.
I think I remember seeing null customer numbers when orders were done at door to general public or via TNEW guest checkout. Please correct me if I'm wrong though.