You need to sign in to do that
Don't have an account?

Override new on related list
Hi,
I'm trying to create a lightning component to override the new button of a custom object 'C' whoch is child of two diferent objects 'A' and 'B'. The reason I need to override it because 'C' has two record types 'a' and 'b' and when user seect 'new' from the related list , it takes them to a page for recordtype selection. What I need is when they are on record page of A, it should directly take them to page layout of recordtype 'a' when they click on New button and similar for record page B.
I have already tried using lightning quick action (only customization) required and that does the job perfectly but I cant place it on related list, it has to be placed on top right of the lightning record page.
I have put together some code for the component but there is something strange. While overriding, even if I select the checkbox 'Skip recordtype selection', it still takes me to the page. as anyone faced this or knws a solution for this? That would be really helpful.
I'm trying to create a lightning component to override the new button of a custom object 'C' whoch is child of two diferent objects 'A' and 'B'. The reason I need to override it because 'C' has two record types 'a' and 'b' and when user seect 'new' from the related list , it takes them to a page for recordtype selection. What I need is when they are on record page of A, it should directly take them to page layout of recordtype 'a' when they click on New button and similar for record page B.
I have already tried using lightning quick action (only customization) required and that does the job perfectly but I cant place it on related list, it has to be placed on top right of the lightning record page.
I have put together some code for the component but there is something strange. While overriding, even if I select the checkbox 'Skip recordtype selection', it still takes me to the page. as anyone faced this or knws a solution for this? That would be really helpful.
You should be able to override the new action directly. Your component should implement lightning:actionOverride interface.
Check this blog: https://andyinthecloud.com/2017/05/30/overriding-standard-actions-with-lightning-components/
Hope that helps.
Regards.
https://salesforce.stackexchange.com/questions/185589/lightning-component-overrides-new-standard-action-with-different-record-type
Sadly it seems like a bug :(
I am currently facing the same issue will you please help me