You need to sign in to do that
Don't have an account?
How to add button on edit page (without overriding with visualforce page)?
I want to add a button on edit page of a record (say button which opens an external URL in a new window, may be a a url for reference). How do I achieve so?
There's always option of overriding with visualforce page, but there's lot of pitfalls around that approach (say a new recordtype or field is added, you need to create new visualforcce page or update the page respectively etc)
Any idea on how to achieve this?
Chirag
Please note that you can add a neat name to the HTML Section say "Welcome to Chatter" and add certain text also (along with the script), so that for the world it will be a "Messages section" and for you it will be automatically executing script.
All Answers
Please note that you can add a neat name to the HTML Section say "Welcome to Chatter" and add certain text also (along with the script), so that for the world it will be a "Messages section" and for you it will be automatically executing script.
Can we open a related list, or child object from this custom button in Edit page layout.
We have a custom object say Sales form, on edit apge of customer object we need to add a button say Save and Add Product(similar to One we can have on Opportunity page). User forget to add Product/SKU after saving the sales form
New Button(Save and Add product), will save the sales-form first and then depends on record type will open the related list(child object).
Say a Sales form is for Custom Program, after save,. it will open up Custom Program relate list.
If Record type is of Price Change Notification it willl open up related list of SKU detail..
Is this possible, please adivse, we have 9-10 different record type, and we don't want to re-write the application with visualforce and all customization.
Hey Chirag,
I tried your script and it totally works.. This def opens up door to do a LOT of customizations on the page behavior.. But isn't this kind of hacking ?
And my only fear is if Salesforce finds out and closes this loophole , the script will stop working one day. I feel Salesforce page is vulnerable !!
But cool work man.. I am afraid my architect might just freak out to see something like this :)
Yes it open LOT of customizations on page behavior. Salesforce doesn't allow it neatly, so we tweaker have to search such ways of doing it. But obv these are not solutions, they are hacks and can stop working any day. So better to inform the same to client when delivering using these approaches, that its a tweak and might not work with salesforce releases.
Chirag,
How do I add onclick functionality to this button based on a field within the case?
Thanks
No its not working now..... it only shows javvasciprt code or sometimes nothing
This looks really useful, but I am having trouble getting it to work. The code only seems to embed in the sidebar on the home page, and I actually need it on the Opportunity page -- how can one make this work?
Thanks
I just had the similar requirement from my client today. i tried with your work around. Code snippet works Perfectly! Configured the same in my sandbox. But due to this code, List views are not getting loaded. It is showing as "Loading...." But it never comes. Once we delete the same button, then it would become normal. Did anyone faced the similar issue. If so, then what is work around for this.
Please suggest.
Seems the script destroys existing onload events.
I created a modification that will keep the existing onload events as is. I removed the timeout too; the onload event will fire after all elements are loaded, so tineout is not necessary:
Read more: Salesforce – Hide standard buttons display (Working version) http://www.chiragmehta.info/chirag/2010/08/16/salesforce-hide-standard-buttons-display-working-version/#ixzz2fMk4GFT6
Could you please post the updated Java Script.
http://docs.releasenotes.salesforce.com/en-us/summer14/release-notes/rn_forcecom_home_page_components.htm
As far as I see, it is not possible to set html or javascript code in the Home Page components since Summer '14 works with the new Rich Text editor.
Could you please upload a working version of the code for this.
Regards
I tried to do in my Dev org, but I am not able to see this button, could you please suggest met Where I did wrong.