Skip to main content

#Vlocity Architects0 personne en discute

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 commentaires
  1. 23 déc. 2025, 06:42

    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

I am using a Type Ahead block in order to allow my users to link to accounts as they type. The problem I am running into is that the section needs to be repeatable. If I click the "Add" button for the repeatable section not only does the new "repeated" section not function but the original section no longer functions as expected.

 

Example 1 : If I click  "Add" BEFORE I fill in the first Type Ahead because I know that I will need to link 2 accounts then neither of the Type Ahead's function (they never return any results). 

 

Example 2: If I link the original Type Ahead before I click "Add" then the first one maintains the expected data but the second one still does not work. However I cannot go back and change the first Type Ahead block, if I do then it will no longer return any results. 

 

What are my options for repeatable Type Ahead block functionality. 

#Omnistudio #Vlocity #Vlocity Architects @Peter Fife

3 réponses
  1. 21 déc. 2022, 20:55

    So after doing some digging and testing I found the problem and a solution. The issue is that when a section repeats it can create a new structure underneath it.

     

    For example <RepeatableBlock:TAAccountBlock:TAData> becomes <RepeatableBlock:TAAccountBlock[n]:TAData> where [n] represents the position in the new created array that the element now exists in.

     

    So the solution is in the Type Ahead block on your Data Raptor Element>Properties under your Input Parameters>Data Source you need to append "|n" to the end of your Data Source value that is getting passed into the Data Raptor. 

     

    Ex: TAAccount would become TAAccount|n

     

    Now your TA block will work as a single or for as many repeats as you might need. 

0/9000

Hello everyone,

When I do a SOQL query to retrieve OS, IP or DR, I don't retrieve any records. Is there a setting in the Vlocity configuration that allows access to Vlocity components via SOQL?

Thanks in advance for your help.

#DataRaptor #Vlocity #Vlocity Architects #Omnistudio

2 réponses
0/9000

Hi,

I configured Field Mapper to map different fields between QuoteLineItem and ContractLine.

it works well during the conversion process from Quote and QuoteLineItem to Contract and ContractLine.

As part of an evolution, I added a new mapping but it does not work.

Is there a job to trigger in the CMT administration panel or a cache to clean for the new mapping to be taken into account? Because I have the impression that my modifications are not taken into account.

Thank you for your help.

#Vlocity #Industry #Omnistudio #Vlocity Architects

0/9000

how to get custom field data for unadded product (not orderitem) but part of bundle productfor in getCartsItems API

I am using getCartsItems API to fetch cart details by providing order id. I need to fetch custom field values on product part of bundle but not added to order. although I am getting standard/vlocity field values for these products in API response but how to fetch for custom field.

Can anyone please help

#Vlocity #Vlocity Architects #Omnistudio 

1 réponse
0/9000