Ok, here is what I am trying to do. I have a list on another site. I have successfully connected to the site and pulled in the list as a dropdown using soap, ajax and jquery. However, once I try and submit the new item, it gives me an error. Here is the code I am using,

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
$(document).ready(function() {
var soapEnv =
    "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
        <soapenv:Body> \
            <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                <listName>b9ac31cc-ea35-4df1-af50-4e3fa9e86b1c</listName> \
                <viewName>7E918A0F-631B-4B3B-81FD-B27C98586DC4</viewName> \
                    <viewFields> \
                        <ViewFields> \
                            <FieldRef Name='Title' /> \
                        </ViewFields> \
                    </viewFields> \
            </GetListItems> \
        </soapenv:Body> \

        url: "/sites/wellness/_vti_bin/lists.asmx",
        type: "POST",
        dataType: "xml",
        data: soapEnv,
        complete: processResult,
        contentType: 'text/xml; charset="utf-8"'

        var choice = $('#chooseOrg').val();

function processResult(xData, status) {
    $(xData.responseXML).find("[nodeName='z:row']").each(function() {

Here is the Error Screen. Image of error

If I remove the soap/ajax/and jquery it adds a new item like it is supposed to, Any Ideas??

  • Can you find the Correlation ID in the logs and post the relevant error messages? Mar 28, 2012 at 14:08
  • I don't have access to the error logs, I have sent the request to another member on my team to see if they can find them for me. Any ideas without?? Mar 28, 2012 at 14:12
  • Well that's the error that displays for almost every error in SharePoint. Have you tried tracing it with FireBug or IE F12 Developer Tools to see what the service response is? Mar 28, 2012 at 14:23
  • I mean, you are using a relative url. Are you sure the endpoint is available from the location you're running it? Mar 28, 2012 at 14:25
  • Yes, it is available, If I take out the dynamic dropdown options, sharepoint saves just like it is supposed to Mar 28, 2012 at 14:33

1 Answer 1


I think the issue is that the options you are adding to the select don't have the same ids as the values in the source list. You're using the Title for both the option text and the value. Assuming that the DropDownChoice is a Lookup column, you need to use the right id for each option to match what would be saved if you weren't running your script.

  • ok, do you know of a way to add them to the list column? I am not sure how to do that. The list column is a "Choice" dropdown. Mar 28, 2012 at 18:09
  • You can't add arbitrary values to the Choice column dropdown; the only values which are allowable are those which you've got in the list settings. Mar 28, 2012 at 18:27
  • ok, thanks for you assistance on this. What I ended up doing was pulling in the values into the dropdown and then having the user add that to a textbox. It works good, a bit klunky but it works. Mar 28, 2012 at 18:30
  • You could add those disallowed values to the text box yourself in your script, since you'll know which ones you've added. Apr 7, 2012 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.