You need to sign in to do that
Don't have an account?
AudiJames
Formula for custom DELETE button
Hi! This is a tricky formula that I'm trying to create.
If the user is an ADMINISTRATOR ROLE of SalesForce, allow the record to be deleted when they click on the custom delete button.
ELSE
give a popup stating that the user doesn't have the permissions to delete the Opp.
Can someone help?
Why are you doing this at the Role level instead of the Profile level?
Anyway, I amended this formula to exempt certain User Profiles from a particular requirement. You might be able to hack it up and use it for your User Role requirement by changing $Profile.Name to $UserRole.Name .
IF(AND(Probability >= 0.50, NOT( $Profile.Name = "System Administrator"), NOT( $Profile.Name = "CSDS Executive Support"), NOT( $Profile.Name = "Executive Support"), NOT( $RecordType.Name = "Bundle Sales Opportunity") ),1,0)
Hi Stevemo -- I don't think we are using Profiles as such -- I have the formula like you have... showing me the IF statement in my custom button, but how can I insert the "delete" command if the IF statement passes successfully?
I know that if I fail the IF, I can do an alert(''You don't have access to this command... See an Administrator'')
IF(AND(Probability >= 0.50, NOT( $UserRole.Name = ''Key Account Administrator''), NOT( $Profile.Name = ''Opportunity Administrator'')),1,0)
Hi James,
I just posted my code as reference that you might be able to hack up, I don;t think that it will work the way that you want in the example you posted.
You still might be able to accomplish what you want to do using Roles, Formulas, and your custom button, but it might be worth your while to start using Profiles on your SFDC Org. They are specifically designed to handle things like Read/Edit/Delete permissions on secific record types, etc.
Which edition of SFDC are you on? and how many users do you have?
Hi Stevemo,
I'll have to check more into the Profiles you speak of. I'm still a newbie in terms of SF users... We have Professional with 50 users at the moment.
Thanks!!! James
I'm going to explore too -- I suppose there is a reason why they make 5 different kinds of mustard, but I'm quite frankly happier if only 1 exists!
:) James