0

How to hide submit for approval button from approval history area when stage level changes from one pick list value to another.

Solution with me at the moment is creating two differrent record type and write a trigger to change the recird type upon changing the pick list value of stage. However how can i create the that custom button that allows user to submit record for approval?

is there any other solution than the one I have? As I don't think above is the best solution?

I have already gone through solution here Display "Submit for Approval" button in the Approval History related list based on condition but since new release summer 15 home page component no more supports JS , so that does not worked for me.

marked as duplicate by Eric, Chris Duncombe, Boris Bachovski, cropredy, Vamsi Krishna Jul 28 '15 at 1:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I have already gone through that before posting it here. That seems not working as the home page componennt no more supports JS. – Ricky Jul 27 '15 at 18:12
  • Yup - Thus not possible. There is a post here somewhere about using Static Resources to work around the custom js issue, let me see if I can find it – Eric Jul 27 '15 at 18:13
  • I imagine this could be done with a VF page, apex:detail component, and jQuery to set css display:none on the button when the condition is true – cropredy Jul 28 '15 at 0:40
1

As stated in my comment, the duplicate question had the only answer and is now defunct due to end of sidebar JS. So basically not currently possible.

However, this workaround (By Uwe) using static resources to inject JS may allow you to do it:

End of javascript sidebar workarounds?

Not the answer you're looking for? Browse other questions tagged or ask your own question.