You need to sign in to do that
Don't have an account?
Fesal Suraitawala
Custom "New" button that pre-selects the RecordType not working in Lighting
I have created a custom button that redirects to new record creation form with selected recordtype.
But this is not working properly in the lightning environment, it's open new form in a popup but after cancel does not redirect to return URL.
Please tell me if you have a better solution.
/a28/e?CF00N0v000004Ku31={TestName}&CF00N0v000004Ku31_lkid={TestId}&retURL=%2F{!ContactId}&RecordType=0120v000000SCPO&ent=01I0v000000MTi6
But this is not working properly in the lightning environment, it's open new form in a popup but after cancel does not redirect to return URL.
Please tell me if you have a better solution.
You should consider using Quick actions instead of custom JS button. Please refer to this link: https://trailhead.salesforce.com/content/learn/modules/lex_javascript_button_migration/javascript_button_alternatives
Thanks,
Ravi
Thanks for quick reply.
I created a URL button, not a javascript.
This is the URL that I used in button:
I can also show it in lightning layout, but it's not working properly. It's open in a modal popup and when I cancel or save the form it does not redirect to return URL, just display a blank page.