0

In Classic, when we created custom object records from related Contacts or Accounts, it would automatically fill in that Account (from Account record), or Account and Contact (from Contact record). In Lightning, this does not happen. Is there a way that it needs to be set up, or do I need to look into creating a trigger to do so ahead of time?

2
  • Are you using custom buttons to create records? Jun 18, 2020 at 14:41
  • @sanket I did find one button that may be the culprit. na6.salesforce.com/a06/e?CF00N80000002Ysw6={!Contact.Name} &CF00N80000002Ysw5={!Account.Name} &CF00N80000002Ysw5_lkid={!Account.Id} &CF00N80000002Ysw6_lkid={!Contact.Id} &retURL=%2F0038000000W2dyE 1, this doesn't look right to me. 2, why would it react differently based on where it was being used? Jun 18, 2020 at 14:52

2 Answers 2

1

URL Hacks are back and in Lightning with Spring ’20, But there have a different base URL as you can see in the below example of a custom button URL

/lightning/o/Contact/new?defaultFieldValues=
OwnerId={!Account.OwnerId}, AccountId={!Account.Id},
MailingStreet={!Account.ShippingStreet},
MailingCity={!Account.ShippingCity}
  • This doesn’t work on mobile. Hopefully, we’ll see this updated in the future.

Reference: https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_general_lex_navigate_to_record_dfv.htm

0

The custom button is doing URL hacking , hence auto populating in classic. However, hacking doesn't work in lightning. So, you would have to achieve this in lightning using some different approach like making aura component than using URL hacking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.