I've looked at the postings on this and I'm confused if this is possible. Can you embed Javascript on an Opportunity page to read/update HTML elements.


I have an Opportunity object with a lot of date fields. The whole process of calculating the dates is somewhat complicated due to all the options. Currently I'm writing a trigger to do it. I would like to eventually do it in Javascript so the manager would have immediate feedback when talking to a client. I would also like to hide options when other options are checked.

  • You could create a minimalistic VF page and put it on your layout (with .js of course). But to get and update SF OOTB elements I think would prove to be quite wonky and extremely fragile (ie if the layout changes, move to production, etc). If you need that kind of control you might want to look at creating a custom VF/Lightning page/component(s) to take care of that. Feb 9 '17 at 14:50
  • Thanks for the reply!! Based on the documents I read that is what I originally told the person interested in this but I saw some postings of people somehow including javascript on the standard page. I'll look into it in the future. Right now I'm swimming in current projects. Feb 10 '17 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.