Invoking page include pop up from Java snippet is not working

edited December 2017 in Questions
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.

Comments

  • edited December 2017
    Have you tried using the action framework to do this? What's the use case here?
  • edited December 2017
    @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
  • edited December 2017
    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
  • edited December 2017
    Thanks for posting the resolution for others to see!
Sign In or Register to comment.