0

We are using Lightning.

Context URL https://stiyej--sdsd.lightning.force.com/lightning/r/ContentDocument/0690D00000sdsdRQAS

We want to get the conten id from the url in Apex. Is there any way we could get it ?

We are not using lightning component. Basically we are using data grid. So we want to know if it is possible directly in Apex to get the id from the context URL.

  • 0690D00000sdsdRQAS this is the content document id, which you can get using URL.getSalesforceBaseUrl().toExternalForm(). Can you please explain a bit more and what you have done so far ? – Mahmood Feb 10 at 11:47
  • How are you using a data grid without using a Lightning component? In what context is your code exposed? – David Reed Feb 10 at 12:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.