none
window.open problem in dynamics crm 2016 on premise

    Question

  • Hi

    i am opening

    "/_controls/lookup/"

    + "lookupsingle.aspx?"+ "class=null&objecttypes=8&browse=0&ShowNewButton=0&ShowPropButton=1"+

          

    "&DefaultType=0&DefaultViewId"+ "={2E0DA637-F157-E611-80DC-005056A91DE8}"

    i need to take the result of the click on add button. how can i do this.

    here is the sample.

    first i had a button on the form, when i click on this button the function take the context server url, concated this url to the lookupsingle form. and i open the url corresponding to.

    Now i can't handle the result of clicking on the cancel or add button

    How can do this action;

    varclienturl = Xrm.Page.context.getClientUrl().toString();

    var url = serverurl + "/_controls/lookup/" + "lookupsingle.aspx?" + "class=null&objecttypes=8&browse=0&ShowNewButton=0&ShowPropButton=1" +


    "&DefaultType=0&DefaultViewId" + "={2E0DA637-F157-E611-80DC-005056A91DE8}";

    window.open(url, "height = 300, width = 250");

    this work properly, but when the view is opening i can take and handle the resultaction on this view, like clicking on add button or cancel

    Thanks.

    Tuesday, March 14, 2017 2:12 PM

All replies

  • Not sure what you're trying to do, but the code you pasted has a typos; first line has clienturl but the second line uses serverurl. Also don't use the .toString() when calling .getClientUrl() it will return a string
    Monday, March 20, 2017 11:25 AM