TypeError: Cannot read property 'init' of undefined

Forums SPJS-Lookup TypeError: Cannot read property 'init' of undefined

This topic contains 3 replies, has 2 voices, and was last updated by  Alexander Bautz 6 months, 1 week ago.

  • Author
    Posts
  • #23792

    Josef Wainz
    Participant

    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 Client

    The 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 6 months, 1 week ago by  Josef Wainz.
    • This topic was modified 6 months, 1 week ago by  Josef Wainz.
    • This topic was modified 6 months, 1 week ago by  Josef Wainz.
  • #23805

    Alexander Bautz
    Keymaster

    Hi,
    My guess is that you haven’t loaded the SPJS-Lookup script. How are you loading DFFS?

    Alexander

  • #23807

    Josef Wainz
    Participant

    I’m in an SP Marketplace IT Portal site. They seem to have loaded DFFS using JSLink per this screenshot.

    Attachments:
  • #23810

    Alexander Bautz
    Keymaster

    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

You must be logged in to reply to this topic.