0

enter image description here

enter image description here

I have a visualforce page overriding the new button of an object. I need the vf page to run some custom validation. Eventually the user is redirected to the new record page of the object. Because that object isn't already on the Nav Bar a 'temporary tab' is produced, like above. Is there any way to customize this temporary tab, prevent it from appearing, or make it close when the new record modal closes ?

One solution I found was to just add the object to the Nav Bar, then lightning would use that tab for the new record modal, but then if the user removes it we're back to square one.

  • I can't find any good resources on these things and how to control them - can you further expand on what it is you are trying to do? – glls Apr 10 '19 at 18:14
  • Thank you will do – SallyRothroat Apr 10 '19 at 18:18
  • also, changin the title to something more representative of your current problem (other than what to you call these) whould help better understand what your problem actually is and help with communnity engagement – glls Apr 10 '19 at 18:23
  • I realize now that this is just a backward design, I'm going to re do but I'm curious about these temp tags. – SallyRothroat Apr 10 '19 at 18:40
0

You can create a static resource "hideTempTab" with the file x.css

//X.css
one-app-nav-bar-item-root[data-id^="temp-"] {
  display: none;
}

you can call this css inside a lightning component

with this code inside:

<ltng:require styles="{!$Resource.hideTempTab}"/>

you can put this component inside a lightning page

| improve this answer | |

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.