Thursday, November 14, 2019

Pre-populate Field Values on Standard Pages in Lightning

In Salesforce classic, we used to specify the field values in URL parameters (URL hacks) to pre-populate the field values in standard page layouts.

In lightning, URL hack don't work. So if we have to open standard page in lightning with pre-populated field values, then we can use "e.force:createRecord" event to open new record page with default field values.

In this blog, I will be creating a lightning component which will be added to account page layout. This component will display button "Create Quick Contact" to create new contact. When user will click on this button, standard new contact page will open with default field values.

Below is complete code:

Now you add this component on account page layout.

Now when you click on Create Quick Contact, standard page will open for new contact creation with pre-filled field values specified in controller.js.


Here you can see recordtypeId, phone, email and account are pre-populated.

Hope this will help!!




14 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Very useful and informative blog. Thank you so much for these kinds of informative blogs.
    who provides seo services, web development services, logo design services, graphic design ,
    digital markeing and all kind of web design, development and digital marketing services.
    best website design services in gurgaon
    web company in delhi
    web desiging company
    web design & development banner
    web design & development company
    web design & development services
    web design agency delhi
    web design agency in delhi
    web design and development services
    web design companies in delhi
    web design company delhi
    web design company in delhi
    web design company in gurgaon
    web design company in noida
    web design company list
    web design company services
    web design company website
    web design delhi
    web design development company
    web design development services
    web design in delhi
    web design service
    web design services company
    web design services in delhi
    web designer company
    web designer delhi
    web designer in delhi
    web designers delhi
    web designers in delhi
    web designing & development
    web designing advertisement
    web designing and development
    web designing and development company
    web designing and development services
    web designing companies in delhi
    web designing company delhi
    web designing company in delhi
    web designing company in gurgaon
    web designing company in new delhi
    web designing company in noida
    web designing company logo
    web designing company sites
    web designing company websites
    web designing delhi
    web designing in delhi
    web designing in gurgaon
    web designing in gurgaon
    web designing service
    web designing services
    web designing services delhi

    ReplyDelete
  3. As far as we understand, the entire procedure does not seem to be very easy! We just need to follow your vital recommendations demonstrated above!

    ReplyDelete
  4. I really want to thank the author for such a nice blog that helped me to understand why it is important. If you are looking for web Design Services for Branding then cloud7itservices.ca is a good choice.

    ReplyDelete
  5. Great job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Thank you because you have been willing to share information with us. DLS Internet Services

    ReplyDelete
  6. This is really such an explanatory post you have shared here about it services. I got some useful knowledge from this post.it support companies Thanks for sharing it.

    ReplyDelete
  7. It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait to read. I am impressed with your work and skill. Thanks. hosted pbx for small business

    ReplyDelete
  8. I will share it with my other friends as the information is really very useful. Keep sharing your excellent work. it support houston tx

    ReplyDelete
  9. Nayza offers the best Men Fitness Apparel, including gym wear and clothes. Achieve your fitness goals in style with our high-quality workout gear.

    ReplyDelete
  10. Get the best deals on the latest shalwar kameez collection. We offer the best quality unstitched fabric for men. Discover that perfect fit by browsing our extensive selection.

    ReplyDelete
  11. Discover the exquisite collection of velvet dress pakistani. Immerse yourself in irresistible velvet dress designs, including Pakistani velvet dresses and stunning velvet kaftans. Experience luxury and elegance like never before.

    ReplyDelete
  12. Jazmin provides a large number of party wear dress for girls and women in Pakistan at low prices. Our latest collection is designed to make you feel confident and stylish. Grab your favorite dresses online at Jazmin.

    ReplyDelete