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

Visualforce area component in Home pagelayouts
Hi Guys,
I am disabling a button using home page component. but in recent release HTML are is deprecated and enabled visualforce area component.
thats why i have created a VF page and included some java scrip on that page and added the same in the component.
but the javascript is not working once the opportunity detail page is load. how to execute the javascript automatically from the visualforce area component.
please suggest on this.
Thanks,
Krish
I am disabling a button using home page component. but in recent release HTML are is deprecated and enabled visualforce area component.
thats why i have created a VF page and included some java scrip on that page and added the same in the component.
but the javascript is not working once the opportunity detail page is load. how to execute the javascript automatically from the visualforce area component.
please suggest on this.
Thanks,
Krish
The button you want to disable is a standrad button or custom button ?
When again you are enabling that button ?
Hi,
First think is that Salesforce is going to stop suppport to javascrip on home page component. (If I am wrong then please upate me)
If salesforce is currently supporting Java Script then you can just write a alert('test'); and verify it .
@Manoj
It is custom button based on the one field value i will disable the button.
@AKG
I have tested with alert but not working some thing needs to be done to execute the script.
Salesforce is mentioned in the component area that "If you want to use JavaScript or other advanced HTML elements in your home page component, we recommend that you create a Visualforce Area component instead."
As per my knowledge html area in home page is depricated from last version . So it will not work .
This is not the best practice but still it depends on you ,
Cretae two record type and two layout for each ,One layout add the button another remove .Based on the field value you need to assign the record type .
Recordtype update you can do by the help of either trigger or workflow .
Thanks
Manoj