The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
How to handle Account Opportunity Record delete event?
Posted: 07 Jul 08 5:30 AM
|
How to handle the account and opportunity delete event.
What I want to do is to stop all users to delete account and opportunity if record is more than 1 day old. Only admin and one perticular user can delete it with out any restriction.
any suggestion/idea.
Irfan |
|
|
| |
|
Re: How to handle Account Opportunity Record delete event?
Posted: 08 Jul 08 5:14 AM
|
Mike,
Thanks for the reply. I did explore some of the Global Scripts and after SQL trace I finally found a quick and easy solution.
When you click Ctrl+D or select delete from edit menu it will trigger EditDeleteItem functions which exists in Global System (Global Script).
One of the function is "OnBeforeFunctionExecute_EditDeleteItem(functionNumber, functionName)" where you can put your code in specific Case and it will execute you code before physical delete. To stop physical delete you just needs to return false.
For Delete FunctionNumber should be 34.
Hope it helps. Irfan
|
|
|
| |
| |
|