How can we use SharePoint Online context in a Nintex Form?
- _spPageContextInfo.userId
- _spPageContextInfo.webAbsoluteUrl
- etc ...
This code not working and return a undefined for _spPageContextInfo, so what Nintex Form use to commit form fields to sharepoint list and keep users informations alive in the nintex form?
var pollSP;
NWF.FormFiller.Events.RegisterAfterReady(function () { console.log("*** NintexForms.js RegisterAfterReady: " + BusinessUnitClientID); pollSP = setInterval(checkSPLoad, 500); try { if (ExpirationDateClientID != "") { SetDefaultExpirationDate(); AttachEventOnChangeInput("input[id='" + ExpirationDateClientID + "']", "SetDefaultExpirationDate();"); if (CollaborationTypeClientID != "") { AttachEventOnChangeInput("select[id='" + CollaborationTypeClientID + "']", "SetDefaultExpirationDate();"); } } } catch (err) { console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); console.log(err); console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } }); function checkSPLoad() { if (clientContext) { window.clearInterval(pollSP); onSPLoad(); } } function onSPLoad() { try { console.log("*** onSPLoad called "); var userId = _spPageContextInfo.userId; console.log("*** onSPLoad Current User = " + userId); } catch (err) { console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); console.log(err); console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } }
To all technicals nintex evangelists, If it's not possible, doe not hesitate and please confirm it to me, so i can stop losing my times with nintex form and do it easiest with an SPFx components.
cheers!







