You need to sign in to do that
Don't have an account?

Urgent help on trigger on Custom object Account
Hey Guys,
Could you please help me construct one bulk trigger ?
I am trying to achieve a requirement :
Before deletes on Account, we need the trigger to check if the Account has any opportunities on the Account. If the Account has opportunities, we need to prevent the deletion and move on to the next record.
Regards
Rajat
Preventing deletions for just one record can be tricky. How is the deletion happening?
Thanks for taking out time to read this Bob.
Yea well,
The delete will happen through a script in Informatica. When that happens in bulk, the trigger should help us not delete the accounts which :
1. Have an Opportunity
2. Have status(custom text field) as 'A'
Do you think we can achieve this ?
Regards
Rajat
Assuming that informatica is using the web services api, the default behaviour for that is to allow individual records to error out of a larger batch. Is there a setting in the informatica side that allows you to confirm this?
If it is using the default, you should be able to add an error to the individual record which stops the deletion happening. This is considered a failure though, so you might get retries happening.