New item does not save to lookup list

Forums Autocomplete New item does not save to lookup list

This topic contains 3 replies, has 2 voices, and was last updated by  Alexander Bautz 2 weeks, 4 days ago.

  • Author
    Posts
  • #21289

    Patrice
    Participant

    I cannot get the below custom-js to save to my lookup list. I have tried a few things to trouble-shoot. 1) Permissions are good 2) Thought perhaps when the Display Name is different from FIN it would make a difference so tested with another field with both the same – didn’t make any difference 3) Tried turning isLookupInSelf = false, and 4) tried adding to the lookup list with spjs-lookup which worked just fine. I recently installed v4.4.3.45 but had not put this code into any previous version so I don’t know if it worked before I upgraded. We have SP2013 back end (server) but still SP2010 front end. I tried in a SP2013 evaluation site but kept getting SOAP errors. My code is below and I have attached a screenshot of field and the console error message I received, however I received this error message in Google Chrome but not IE11; new item was not saved in either browser. Any thoughts? Thank you, as always.

    spjs.ac.textField({
    “applyTo”: “Company”,
    “helpText”: “Start typing to search for Company”,
    “loadText”: “”,
    “listGuid”: “69B37C20-7963-420C-94A1-97F8E9C5DEF9”,
    “listBaseUrl”: “/sites/DCO/ACDC/ACDCDev”,
    “showField”: “Title”,
    “searchFields”: [],
    “filterCAML”: “”,
    “useREST”: false,
    “preloadData”:false,
    “filterREST”: “”,
    “optionDetailFields”: [],
    “optionDetailPrefix”: [],
    “enforceUniqueValues”: true,
    “rowLimit”: 15,
    “listOptionsOnFocus”: false,
    “minLengthBeforeSearch”: 3,
    “reValidateOnLoad”: false,
    “allowAddNew”: true,
    “isLookupInSelf”: true,
    “addNewAdditionalFields”: [],
    “multiselect”: false,
    “multiselectSeparator”: “; “,
    “orderBy”: {
    “fin”: “Title”,
    “ascending”: true
    },
    “setFields”: [],
    “debug”: true
    });

  • #21302

    Alexander Bautz
    Keymaster

    Hi,
    The error refers to this setting:

    "listBaseUrl": "/sites/DCO/ACDC/ACDCDev",

    Please verify that this is the correct base URL of the site (not the list). Also, the setting “isLookupInSelf” must be set to false if the list you are looking up in isn’t the current list.

    Alexander

  • #21312

    Patrice
    Participant

    SUCCESS! Thank you – I didn’t understand the “isLookupInSelf”. Sorry to be a bother.

    Patrice

  • #21318

    Alexander Bautz
    Keymaster

    I’m glad you figured it out!

    Alexander

You must be logged in to reply to this topic.