Redirect to Constituent from Task
Ernest Noa
New Member
Hi, I have many years of experience as a developer, but only three months of experience working with BlackBaud.
I have created a task that loads an EditDataForm which uses a SearchSpec and Translation Spec with a few stored procedures. I am restoring a deleted constituent using Audit Tables. Everything is executing as desired, however, when the work is complete I want to redirect to the constituent I just restored. I have not been able to figure this out.
If I configure the Post-ActionType to go to the constituent page and hard code a random constituent ID as an expression I can redirect after my task is completed. I can't figure out how to pass the constituent ID back to the Post-Action (or otherwise access it).
If I were writing an application from scratch, redirecting to the page would be done in code, and would be a piece of cake. I've wondered if I should be adding code to my UIModel in the on saved event. This doesn't seem quite right, but maybe it's the way to go.
Any suggestions?
Thank you,
Ernie
I have created a task that loads an EditDataForm which uses a SearchSpec and Translation Spec with a few stored procedures. I am restoring a deleted constituent using Audit Tables. Everything is executing as desired, however, when the work is complete I want to redirect to the constituent I just restored. I have not been able to figure this out.
If I configure the Post-ActionType to go to the constituent page and hard code a random constituent ID as an expression I can redirect after my task is completed. I can't figure out how to pass the constituent ID back to the Post-Action (or otherwise access it).
If I were writing an application from scratch, redirecting to the page would be done in code, and would be a piece of cake. I've wondered if I should be adding code to my UIModel in the on saved event. This doesn't seem quite right, but maybe it's the way to go.
Any suggestions?
Thank you,
Ernie
0
Comments
-
Hi, the "Add constituent" task re-directs to the Constituent Page as a Post-Action, but with no context, I assume it uses the Added record as context. Have you tried using "None" as context on your task ?1
-
Hi Phil,
I have tried it configured as you suggested, with the context set to "None" This does not work. My edit form, search lists and stored procedures pass around an audit record ID. Although the constituent ID is part of this record, it's not explicitly passed back and forth by me. Clearly this needs to happen. Even if I create a field on my edit form to hold this value, how do I use it? How does my task consume it and redirect the user to the target constituent?
Thank you for the suggestion.
Ernie0 -
Hey Phil,
Ultimately what you suggested was the right answer. I had to re-select my add form, although I could not tell you why. After reselecting the add form and using the configuration you suggested, everything worked just fine. I appreciate your help.
Thank you,
Ernie Noa0 -
HI Ernie
Good to know ! What you have built sounds to me like it should have a wider audience. We have had a few instances where we have merged constituents, and then needed to reverse the decision. If the record is deleted in the merge, then using your method from the audit trail would be a good way to get the constituent back again. Are you also looking at other tables to restore data from ?
0 -
Hi Phil,
Restoring deleted or merged data wasn't too bad. Figuring out if a record had been merged, and unmerging records that were incorrectly merged required using the CONSTITUENTMERGEOPERATIONS table. Here is a tsql code snippet:
FROM CONSTITUENTMERGEOPERATIONS cmo
INNER JOIN ADDRESSAUDIT aaBEFORE on cmo.SOURCEID = aaBEFORE.CONSTITUENTID
AND aaBefore.AuditType = 'BEFORE UPDATE'
INNER JOIN ADDRESSAUDIT aaAFTER on cmo.TARGETID = aaAFTER.CONSTITUENTID
AND aaAfter.AuditType = 'AFTER UPDATE'
INNER JOIN CONSTITUENTAUDIT ca on cmo.SOURCEID = ca.AUDITRECORDID
WHERE aaBEFORE.AUDITRECORDID = aaAFTER.AUDITRECORDID
AND aaBEFORE.AUDITKEY = aaAFTER.AUDITKEY
AND aaBEFORE.CONSTITUENTID = @TARGETCONSTITUENTID
and aaBEFORE.CONSTITUENTID != aaAFTER.CONSTITUENTID
I have written something similar for each audit table I want to restore from.
Hope this is useful.
Ernie0
Categories
- All Categories
- 6 Blackbaud Community Help
- 212 bbcon®
- 1.4K Blackbaud Altru®
- 399 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 655 Blackbaud Grantmaking™
- 572 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 34 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 790 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
