Skip to main content

Hello. Why omniscript reload when the method This.omniNavigateTo() is called from lwc that IS embeded in omniscript?

#Omnistudio #Omni #Vlocity #Vlocity Architects #Salesforce Developer #Salesforce Developers #Developer #Developers #Lightning Web Components
2 comments
  1. Dec 23, 2025, 6:42 AM

    The this.omniNavigateTo() function triggers a page navigation event. When used inside an LWC embedded within an OmniScript, it often bubbles up and causes the entire OmniScript container to refresh or re-initialize, looking like a "reload."

    Solution:

     

    Instead of this.omniNavigateTo(), use the

    OmniScriptBaseMixin events to communicate with the parent OmniScript without forcing a full page navigation.

    1. If moving to the Next Step:

    javascript

    this.dispatchEvent(new CustomEvent('omninesxtstep'));

    If updating data:

    javascript

    this.omniApplyCallResp({ "yourData": "value" });

    Why it happens: omniNavigateTo is designed for PageReference navigation (like moving from Salesforce Page A to Salesforce Page B). When you call it, the framework assumes you are leaving the current context, so it reloads the component wrapper. Avoid using it for simple step transitions inside the same OmniScript. 

    1. https://trailblazers.salesforce.com/profileView?u=0053A00000FTqkWQAT
0/9000