0

I am trying to create a list type button which will be added to a related list. Say I have a object name classroom and a object name student who has a lookup field for classroom. Now I wanted to auto populate students new record creation form fields with some similar fields of the classroom. I was able to do that but the problem is when I click the button the modal opens and in the background it shows the details tab instead of related tab. How do I redirect myself to the related tab if I cancel the modal? I tried to use navigationLocation=RELATED_LIST, but it did not work. My url looks something like this

/lightning/o/student__c/new?&defaultFieldValues=ref_ContractName__c={!Contract__c.Id},LocAddress__c={!Contract__c.LocAddressId__c}
    &nooverride=1
    &useRecordTypeCheck=1
    &navigationLocation=RELATED_LIST
    &backgroundContext=/lightning/r/Contract__c/{!Contract__c.Id}/view
  • can you add some screenshots as well to make question clear? – sanket kumar Sep 2 at 4:24
  • You can create a custom lightning component if your requirement of opening a modal is not mandatory. – maniac coder Sep 2 at 9:18
  • @maniaccoder It is mandatory and it must look like the default one – adnan_aust Sep 2 at 9:19

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.