Cross-site Lookup Save Problem
Posted: 02 Feb 2015
Hi;
I used cross-site lookup on my forms.If I get value diffrent site while ı was saving my form I get below error.
When I opened form ı can see data another site on cross-site lookup.My problem seems only saving form.
What does it mean this error?
Line: 152
Error: Object doesn't support property or method 'replace'
form.min.js
var listId=container.attr('fd_list')?container.attr('fd_list'):_spPageContextInfo.pageListId;var cslInitScriptKey=('csl_init_'+containerId+'.js').replace(/-/g,'_');RegisterSod(cslInitScriptKey,(_spPageContextInfo.siteServerRelativeUrl=='/'?'':_spPageContextInfo.siteServerRelativeUrl)+'/_layouts/15/plumsail/crosssitelookup/jsinitializer.ashx?web='+encodeURIComponent(_spPageContextInfo.webServerRelativeUrl)+'&list='+listId+'&field='+encodeURIComponent(fieldName)+'&el='+encodeURIComponent(containerId)+'&key='+encodeURIComponent(cslInitScriptKey)+'&rev='+(new Date()).getTime());RegisterSodDep(cslInitScriptKey,'csl_lookup.js');LoadSodByKey(cslInitScriptKey);if(typeof(_spFormOnSubmitWrapper)!=='undefined'){var _spFormOnSubmitWrapperOrig=_spFormOnSubmitWrapper;_spFormOnSubmitWrapper=function(){var returnValue=_spFormOnSubmitWrapperOrig();if(returnValue){if(input.data('select2')&&input.data('PlumsailCrossSiteLookup')){var data=input.select2('data');var csl=input.data('PlumsailCrossSiteLookup');if(data){if(csl.multiple){var values=[];$.each(input.select2('data'),function(){values.push(this[csl.keyField]+';#'+this[csl.titleField].replace(';',';;'));});if(values.length>0){input.val(values.join(';#'));}}else{if(typeof(data[csl.keyField])!=='undefined'&&typeof(data[csl.titleField])!=='undefined'){input.val(data[csl.keyField]+';#'+data[csl.titleField].replace(';',';;'));}}}}}
I used cross-site lookup on my forms.If I get value diffrent site while ı was saving my form I get below error.
When I opened form ı can see data another site on cross-site lookup.My problem seems only saving form.
What does it mean this error?
Line: 152
Error: Object doesn't support property or method 'replace'
form.min.js
var listId=container.attr('fd_list')?container.attr('fd_list'):_spPageContextInfo.pageListId;var cslInitScriptKey=('csl_init_'+containerId+'.js').replace(/-/g,'_');RegisterSod(cslInitScriptKey,(_spPageContextInfo.siteServerRelativeUrl=='/'?'':_spPageContextInfo.siteServerRelativeUrl)+'/_layouts/15/plumsail/crosssitelookup/jsinitializer.ashx?web='+encodeURIComponent(_spPageContextInfo.webServerRelativeUrl)+'&list='+listId+'&field='+encodeURIComponent(fieldName)+'&el='+encodeURIComponent(containerId)+'&key='+encodeURIComponent(cslInitScriptKey)+'&rev='+(new Date()).getTime());RegisterSodDep(cslInitScriptKey,'csl_lookup.js');LoadSodByKey(cslInitScriptKey);if(typeof(_spFormOnSubmitWrapper)!=='undefined'){var _spFormOnSubmitWrapperOrig=_spFormOnSubmitWrapper;_spFormOnSubmitWrapper=function(){var returnValue=_spFormOnSubmitWrapperOrig();if(returnValue){if(input.data('select2')&&input.data('PlumsailCrossSiteLookup')){var data=input.select2('data');var csl=input.data('PlumsailCrossSiteLookup');if(data){if(csl.multiple){var values=[];$.each(input.select2('data'),function(){values.push(this[csl.keyField]+';#'+this[csl.titleField].replace(';',';;'));});if(values.length>0){input.val(values.join(';#'));}}else{if(typeof(data[csl.keyField])!=='undefined'&&typeof(data[csl.titleField])!=='undefined'){input.val(data[csl.keyField]+';#'+data[csl.titleField].replace(';',';;'));}}}}}