My app is in lightning experience. I want to add custom address search javascript component to my custom object record creation form.

First i tried to get the address search work in lightning component, but i had to import the external javascript component as static resource, because you can not use <scrtipt> tags in lightning component. I couldn't get it to work.

Then i tried to use visualforce page for that. I got the address searching functionality working. I override "new" button with VF page. Now i am looking for a way to replicate the exact form of my custom object record creation form and my idea is to just add the search form there.

Is there a way to replicate the look&feel and standard page fields out of the box or i have to do it all manually, that is my question.

This is what my address search looks like. Example of my standard page form

These address search fields are not available on a custom object thats why i need to implement custom address search. Showing this form for an example.

  • 4
    Have you looked at the <apex:detail> component? For what purpose are you making a Visualforce page that looks exactly like the standard layout?
    – David Reed
    Apr 16, 2018 at 15:58
  • More Importantly, if it's exact.... why do you need VF? Can you elaborate on your need? Apr 16, 2018 at 16:06
  • @SebastianKessel I need to add a custom address search functionality from external source, and i can't add it any other way to replicate the standard page and put it in the form. At least i could not figure out any other way.
    – RSICK
    Apr 16, 2018 at 16:12
  • @DavidReed I tried to use <apex: detail> component, but it did not work.
    – RSICK
    Apr 16, 2018 at 16:15
  • 2
    @RSICK This information that's coming out in comments should be in your question. Share with us what you're aiming at and what you've tried or we just end up in a guessing game. If apex:detail didn't work for you, say why.
    – David Reed
    Apr 16, 2018 at 16:17


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.