Invoking page include pop up from Java snippet is not working

  • 1
  • Question
  • Updated 11 months ago
  • Answered
I have this following function to invoke pop-up where I have a page include
 function openContactInfoPopUp(OpptyId, ShowSec){
	    console.log('I am in pop-up function--Dinesh', OpptyId,'---',ShowSec);
	    var popupXMLString = 
	        '<popup title="Contact Information" width="90%">'
                +'<components>'
                    +'<custom name="popupPlace" uniqueid="sk-qs-sc-3668"/>'
                    +'<includepanel type="skuid" uniqueid="sk-qt1t0-3671" pagename="OpptyContactMethods" module="" querystring="?oid='+OpptyId+'&ShowSec='+ShowSec+'" lazyload="true"/>'
                +'</components>'
                +'<afterclose>'
                    +'<action type="custom" snippet="RedirectScreenJS"/>'
                +'</afterclose>'
            +'</popup>';
        var popupXML = skuid.utils.makeXMLDoc(popupXMLString);
        var popup = skuid.utils.createPopupFromPopupXML(popupXML);
	}
Couldn't understood where I am going wrong. pop-up is not showing. Any help is appreciated. Thanks.
Photo of Dinesh Ramanadham

Dinesh Ramanadham

  • 372 Points 250 badge 2x thumb
  • confused, sad, frustrated

Posted 11 months ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Have you tried using the action framework to do this? What's the use case here?
Photo of Dinesh Ramanadham

Dinesh Ramanadham

  • 372 Points 250 badge 2x thumb
@stephen: in the function i am passing opptyid parameter right. that is an ID of opportunity. which we are saving using java snippet. and this page include need that ID as an input in order to query it's models
Photo of Dinesh Ramanadham

Dinesh Ramanadham

  • 372 Points 250 badge 2x thumb
I am able to resolve the issue. problem here is with the xml construction. I have validated the xml and found this is the problem.
I wrote like
'<includepanel type="skuid" uniqueid="sk-qt1t0-3671" pagename="OpptyContactMethods" module="" querystring="?oid='+OpptyId+'&ShowSec='+ShowSec+'" lazyload="true"/>'
instead it has to be
'<includepanel type="skuid" uniqueid="sk-qt1t0-3671" pagename="OpptyContactMethods" module="" querystring="?oid='+OpptyId+'&amp;ShowSec='+ShowSec+'" lazyload="true"/>'
Thanks
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Thanks for posting the resolution for others to see!