Get ID of Item From Query String and Display It on Edit form Page.

Hi Folks,
We Have Online Sharepoint Request from for Users to Submit their Request once users submit the request admin Verify Request and edit it to tag.Now admin want to Display ID of the Item they are editing so they can reference in Comments and Workflow.
You Always can Use SPD to do this but i decide to go with Jquery.here is Jquery

     <script src="/JSLibrary/jquery-1.3.2.min.js" type="text/javascript"></script>
     <script type="text/javascript">
                $(document).ready(function() {
                      var qs= location.search.substring(1, location.search.length);
                      var args = qs.split("&");
                      var ID = args[0].split("=");
                      var Title=$("h2.ms-pagetitle").text();
                      var IDTitle = " (ID: "
                      var NewTitle= Title + IDTitle + ID[1] +")"
                      $("h2.ms-pagetitle").text(NewTitle)
               });
      </script>

This Will Display ID in Editform.aspx like Title of Item (ID: ##)


Thanks
Ronak

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s