Home › Forums › Autocomplete › New item does not save to lookup list
- This topic has 3 replies, 2 voices, and was last updated 6 years, 5 months ago by Alexander Bautz.
-
AuthorPosts
-
-
June 28, 2018 at 18:37 #21289
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
});Attachments:
-
June 28, 2018 at 20:27 #21302
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
-
June 29, 2018 at 14:05 #21312
SUCCESS! Thank you – I didn’t understand the “isLookupInSelf”. Sorry to be a bother.
Patrice
-
June 29, 2018 at 16:16 #21318
I’m glad you figured it out!
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.