Home › Forums › SPJS-Lookup › TypeError: Cannot read property 'init' of undefined
Tagged: SPJS-lookup, TypeError
- This topic has 3 replies, 2 voices, and was last updated 5 years, 10 months ago by Alexander Bautz.
-
AuthorPosts
-
-
February 12, 2019 at 18:16 #23792
I’m doing a simple SPJS-Lookup, but I keep getting:
DFFS: There is an error in the Custom JS textarea:
TypeError: Cannot read property ‘init’ of undefined
I’m referring to a list 1 level up from the list with the lookup column.
The Cases list I am adding the SPJS-Lookup to is at: https://me.sharepoint.com/sites/spmp/intranet/it
The single line of text field to convert to a lookup is called ClientThe lookup list called Clients is at: https://me.sharepoint.com/sites/spmp/intranet
I’ve uploaded a screenshot of the debugger output.
Below is the js in Custom JS:
spjs.lookup.init({
“fieldToConvertToDropdown”: [
“Client”
],
“listName”: “Clients”,
“listBaseUrl”: “/sites/spmp/intranet”,
“optTextFieldInternalName”: “Title”,
“pipeDelimitedOptions”: “false”,
“optValFieldInternalName”: “ID”,
“orderBy”: {
“fin”: “Title”,
“ascending”: true
},
“clearInvalidSelections”: true,
“filterObj”: {
“on”: false,
“folder”: “”,
“CAML”: null,
“fin”: “”,
“isLookup”: false,
“operator”: “”,
“filterVal”: “”
},
“dropDownDefaultvalue”: “”,
“allowBlank”:true,
“parseFunction”: “”,
“addYouOwnValue”: {
“on”: false,
“linkText”: “Write your own value”
},
“addToExternalList”: {
“on”: false,
“customFunction”: null,
“linkText”: “Add new item”,
“saveNewItemText”: “Save new item”
},
“debug”: false,
“customSort”: “”
});- This topic was modified 5 years, 10 months ago by Josef Wainz.
- This topic was modified 5 years, 10 months ago by Josef Wainz.
- This topic was modified 5 years, 10 months ago by Josef Wainz.
Attachments:
-
February 12, 2019 at 19:20 #23805
Hi,
My guess is that you haven’t loaded the SPJS-Lookup script. How are you loading DFFS?Alexander
-
February 12, 2019 at 19:45 #23807
I’m in an SP Marketplace IT Portal site. They seem to have loaded DFFS using JSLink per this screenshot.
Attachments:
-
February 12, 2019 at 20:23 #23810
I see. I would recommend that you hit the button to uninstall the JSLink version and then reinstall with the DFFS Installer.
Please note thar you might need to look over the rules to ensure all work as planned because there have been some changes and bugfixes over the years that might mean you must reconfigure some rules. This depends on which version you are currently running, but I don’t think it will be any major issues with the upgrade.
For the record: Uninstalling and reinstalling will only affect this form and not all forms with the JSLink version.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.