Perform an Sobject Describe From A Snippet

  • 1
  • Question
  • Updated 2 years ago
  • Answered
Has anyone ever performed an describe call for Salesforce from a Javascript Snippet? I am basically looking to be able to display all fields to a user in a picklist. The issue I have is they are allowed to select the object first. 

Any help would be greatly appreciated!

Thanks!
Photo of rensley

rensley

  • 316 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Adam Edmonds

Adam Edmonds

  • 454 Points 250 badge 2x thumb
After a quick look around, I didn't immediately see a method to describe a model.  You may want to look into incorporating JSForce (link: https://jsforce.github.io/ ) to assist in accessing the Salesforce Metadata API.  Salesforce also has a walkthrough that may be beneficial: https://developer.salesforce.com/blogs/developer-relations/2015/02/using-metadata-api-describe-objec...
Photo of rensley

rensley

  • 316 Points 250 badge 2x thumb
Thanks Adam! I ended up using JSForce. It accomplished my need and a bit of work and got what I was trying to do accomplished.