qListForm: The ID HTTP parameter is required - SharePoint Customization - SharePoint for All - Dell Community

qListForm: The ID HTTP parameter is required

qListForm: The ID HTTP parameter is required

This question is not answered

I have a tracker where we are building a subsite to manage a bunch of stuff.  I want to show the display form of that one item on the side of the page of default.aspx on the subsite for that item.  I can put ../subsite/default.aspx?ID=4 and have it work, but that isn't a solution because if anyone works on that subsite and tries to return to the main page, they get default.aspx not default.aspx?ID=4.  What can I do so that it has a static parameter of ID=4 fed to that web part and not worry about my URL?  I tried to create an OOTB Query String URL Filter, but it cannot pass a value to anything but the other OOTB web parts.

All Replies
  • Hi,

    I am sorry, I am not understand your question very well. Could you give me a sample? Something like your business steps.

    qListForm can receive the HTTP parameter explicitly, But if you click the link that doesn’t carry the ID parameter, qListForm can do nothing in this case. Our web part such as qListView, it can pass the parameter by doing some setting, such as custom action.

     

    Kenny.

  • Each item in a tracker (list) I have on the parent site gets its own subsite.  The subsite has another 12 libraries and 20 lists to support the item in the tracker.  The subsite has a web part for announcements and the calendar and such in the center.  On the right, I put the qListForm for the tracker on the parent site.  As long as I add ?ID=4 or whatever the ID is for the item in the tracker the subsite is for at the end of the URL, I get the information displayed on the subsite's default.aspx page.  I was hoping I could put the ID=4 somewhere in the webpart itself because I can add the ID=4 to the URL in the navigation but not the breadcrumb.

  • Hi,

     

    The only way to keep the URL with the ID parameter I can see is to use some JavaScript to do it.

     

    1. Add a HTML Form Web Part into the page;
    2. Write below JavaScript in the Source Editor:

    <script>

    var url = window.location;

    if(url.toString().indexOf('ID') == -1)

    {

       if(url.toString().indexOf('?') == -1)

       {

         window.location.href = url+'?ID=4';//the ID value is 4

       }

       else{

           window.location.href = url+'&ID=4'; //the ID value is 4

       }

    }

    </script>

    This script is to detect the URL, if doesn’t contains ID parameter, then add it and refresh the page. the ID value is hardcode to 4 here, you can modify it according to your business scenario.

     

    Kenny.