• Mishika Mahajan 16
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Is there any way I can access the fields on a standard page with javascript using the $Component function or something similar without needing to hard-code the element ID?

 

I'm using the standard asset page.  I have a button that calls a webservice to update a couple fields on the page.  I would like to write some additional javascript to update the appropriate fields on the page without needing to initiate a page refresh.  I know I can probably accomplish this by hard-coding the element ID's based on what I see in the generated page source, but I know that's not a good practice.  All the javascript component documentation I've found assumes you are doing a visualforce page, but I really need to figure this out from within the standard page, where I have no control over what ID's are assigned to components.