You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
NavigationMixin.Navigate not redirecting
Hello All,
I have a LWC wrapped inside an aura component.
This is used in a Quick action.
I am trying to redirect to the newly created child record but the page save but does not redirect. It stays on the parent record.
Code is called on success:
Thanks,
P
I have a LWC wrapped inside an aura component.
This is used in a Quick action.
I am trying to redirect to the newly created child record but the page save but does not redirect. It stays on the parent record.
Code is called on success:
import {CurrentPageReference,NavigationMixin} from 'lightning/navigation' export default class GetValueInLWC extends NavigationMixin (LightningElement) { this[NavigationMixin.Navigate]({ type: 'standard__recordPage', attributes: { recordId: event.detail.id, objectApiName: 'Payment_Term__c', actionName: 'view' } });I know I am getting the new record id but it does not redirect. Is it becuase the LWC is wrapped in an aura component? What are my options?
Thanks,
P
If none of the redirections work it could be because it is wrapped in an aura component and it does not work that way
All Answers
You have to write navigation logic on parent aura component not on lwc. In Lwc, after save success you need to invoke aura method. In this method you have to write navigation logic.
If none of the redirections work it could be because it is wrapped in an aura component and it does not work that way