Issue with raiserror in batch
We are extending the Enhanced Revenue Batch but are running into issues when we attempt to throw our own errors in the commit → add section.
When the batch is initially committed everything seems to work fine and the validation report shows our errors but when you go into the exception batch only the last row has the error. I've confirmed the errors are not in the error message table either (except the last row).
If you fix the last row and try to commit the exception batch, the last row is handled correctly but then the new exceptions batch again only shows the error for the next last row.
Wondering if anyone has run into something like this before.
Our code is not overly complicated and mostly follows the examples from BB's batch type extension spec exercise. The weird thing is, pretty much the exact same code works when we extend the constituent update batch or when we use the same type of exception logic on our custom batches.
– Check if the constituent has a name request note
if (@IMPORT_CONSTITUENTID is not null)
begin
select top 1 ID
from CONSTITUENTNOTE
where CONSTITUENTID = @IMPORT_CONSTITUENTID
and CONSTITUENTNOTETYPECODEID = '451F41C0-1B27-44BC-B053-38A96A2974AA'@ROWCOUNT > 0)
begin
-- This should happen the first time the end users commits
-- If name request exception is 0, meaning we want to throw this error for
-- rows where the constituent had a name request note that need manual review.
raiserror('Constituent has name request', 13, 1)
end
Original batch showing it has 2 errors after attempting the initial commit

Exception batch only showing one error on the last row

Comments
-
Hi John,
Not something I can help with I'm afraid, but I was wondering if you had managed to work out a solution to this?
Best,
Will0
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 402 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®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 941 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) 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
- 796 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)