Skip to main content
Nintex Community Menu Bar
Question

Creating a popup from XML in Skuid V2

  • July 11, 2024
  • 3 replies
  • 3 views
  • Translate

Forum|alt.badge.img+4

Hi,

We are working on rebuilding a V1 page in V2. In our page, we have a snippet that is creating some popups via skuid.utils.createPopupFromPopupXML(popupXML). The createPopupFromPopupXML function does not seem to be working in V2 even though it shows up in the V2 developer documentation. 

 I tried simplifying the popup XML and actually pulled the exact example from the V2 documentation but still couldn’t get it to work. I also grabbed the XML from a simple modal and tried that, but received an invalid XML error. 

Can someone confirm if createPopupFromPopupXML() does indeed work in V2? A basic example would be very appreciated.

Thanks!

Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Forum|alt.badge.img+13

Hi Tim,

Confirmed, createPopupFromPopupXML() does not work in V2. Our Product Content team is reviewing this to have this API method removed from the V2 developer documentation, as it should not be present there, and the team is doing a more extensive review to verify that there are not other improperly documented methods which are in the V2 docs that should not be present there.

The recommended successor to this method, which works in V1 as well by the way, is to create an Action Sequence which creates the popup (and does any other preliminary model loading, block UI, etc. that you might need to do before showing the popup), and then just invoke the Action Sequence from your snippet… if you indeed need to be invoking it from a snippet at all. I’d highly recommend trying to find a declarative way to do this, as there probably is one, BUT if you really need to be invoking the popup from the Snippet, I would use the following:

skuid.actionSequences.getByName(“Show Quote builder”).run();

OR to make sure that if you change the action sequence’s name, nothing breaks, use getById():

skuid.actionSequences.getById("“82793f2e-b6b1-40dd-93ac-5cc0d7192b5d”).run();

Translate

Forum|alt.badge.img+4
  • Author
  • 33 replies
  • July 11, 2024

Zach,

Thank you for the quick reply. We are creating a few different popups via the snippet based on the response of a callout. I don’t think we will be able to call the popups 100% declaratively, but invoking the declarative popup action sequence from the snippet will be a great solution for us. Thanks again!

Translate

Forum|alt.badge.img+13

Tim, one thing you might be able to leverage here is Inputs for your reusable Action Sequences — you can make an Action Sequence, and in your case any popups that are shown, more dynamic, by declaring Inputs for the Action Sequence, and then invoking the sequences with different inputs from your snippets:

Let’s say you want to selectively load different Models before showing a popup. You could declare an input in your Action Sequence called “modelToLoad” of type “Model”, and then have a “Query Model” action which loads the Model passed in through the Input, and then you can invoke the Action Sequence this way:

skuid.actionSequences.getById(““82793f2e-b6b1-40dd-93ac-5cc0d7192b5d”).run({
   modelToLoad: “Accounts”
});

and somewhere else you could do this:

skuid.actionSequences.getById(”“82793f2e-b6b1-40dd-93ac-5cc0d7192b5d”).run({
   modelToLoad: “Contacts”
});

Not sure if that will help in your case — but, just some ideas.


Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings