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

Detail View Customer Button to change field value of a picklist -- visibility depend on profile
Hi,
I have a customer button in the detail view.
I want to change a field value (for the same object), if i click this button.
I create this button as : Execute JavaScript
On Click JavaScript
and code:
But it is not running.
Do you have an Idea?
My second Problem is how can i set security on Button? : depend on profile a button is visible or not visible.
Thx
Magda
I have a customer button in the detail view.
I want to change a field value (for the same object), if i click this button.
I create this button as : Execute JavaScript
On Click JavaScript
and code:
Code:
{!Object__c.Picklist__c}.set( 'Value');
But it is not running.
Do you have an Idea?
My second Problem is how can i set security on Button? : depend on profile a button is visible or not visible.
Thx
Magda
Hi Magda,
I think just setting the value to the field doesnt help.
You need to use AJAX tools to update the object as well and then display the detail page of the object.
The only way i can think of for setting the security for the button is to have a seperate page layout for that profile.
Hope this helps!
what i don't know is:
how can i modify the object i'm seing.
I try this:
And it is not running.
My Idea is
1 first select in the result my object --> How can I do that?
2 update this object
3 refresh my page --> How can i do that?
Thx
Magda
Message Edited by magda on 02-21-2008 02:54 AM
account.id = '{!Account.Id}';
account.Picklist__c = 'New Value';
result = sforce.connection.update([account]);
thx it is running
;)