You need to sign in to do that
Don't have an account?
Ron Maffrand
how to prevent the final Solution record from deleting for the parent Opportunity record.
How do I prevent the final Solution record in a list of solution records from deleting for the parent Opportunity record?
Steps suggested by a developer as follows:
>>create a trigger on Solution Record object on before delete event
>>Fetch the details of the parent opportunity record using the id of the solution record
>>check the number of solution record associated wit the opportunity.
>>if the result is one it means that this solution record is the last record and display an error message.
>>if the result is more than one allow to delete the record.
Anybody have sample code to do this or similar example?
Steps suggested by a developer as follows:
>>create a trigger on Solution Record object on before delete event
>>Fetch the details of the parent opportunity record using the id of the solution record
>>check the number of solution record associated wit the opportunity.
>>if the result is one it means that this solution record is the last record and display an error message.
>>if the result is more than one allow to delete the record.
Anybody have sample code to do this or similar example?