CrossSiteLookup for external List / BDC / BCS
Posted: 22 Mar 2019
Hi,
i've allready ask this question in the past, but maybe there is still a way to achive this?
viewtopic.php?f=5&t=2007&p=6327&hilit=e ... list#p6327
I'm able to provision the CrossSite-Lookup via JavaScript as a Website-Column.
If i define it as a normal Lookup column, to point to a external List, i'm able to create a normal CrossSiteLookup field. I can search for items in the external list. But i cant save the value.
In the Screenshot "CrossSiteLookup_ExternalData_Lookup.png" you see the lookup with BdcIdentity as Lookup-Column and "Titel" as additional value.
The field schema looks like this:
If i defnie it as a normal BusinessData column, but with the csl for crosssitelookup as JSLink, it dosnt render and im getting this error:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei XgFcmC1xTrcISwPFCT.SGUPD7vHtpq3qLiS8d..ctor(XDocument )
bei Plumsail.CrossSiteLookup.JSInitializer.RWUTGCZ4U(HttpContext )
The schema for this field looks like this:
i've allready ask this question in the past, but maybe there is still a way to achive this?
viewtopic.php?f=5&t=2007&p=6327&hilit=e ... list#p6327
I'm able to provision the CrossSite-Lookup via JavaScript as a Website-Column.
If i define it as a normal Lookup column, to point to a external List, i'm able to create a normal CrossSiteLookup field. I can search for items in the external list. But i cant save the value.
In the Screenshot "CrossSiteLookup_ExternalData_Lookup.png" you see the lookup with BdcIdentity as Lookup-Column and "Titel" as additional value.
The field schema looks like this:
Code: Select all
<Field Group="_MyGroup" xmlns:csl="Plumsail.CrossSiteLookup"
csl:NewContentType=""
csl:NewText=""
csl:ItemFormatResultTemplate="function(item) {
 return '<span class="csl-option">' + item["{LookupField}"] + ' - ' + item["Titel"] + '</span>';
}"
csl:RetrieveItemsUrlTemplate="function (term, page) {
 if (!term || term.length == 0){
 return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Titel&$orderby={LookupField} asc&$top=10";
 } return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Titel&$orderby={LookupField}&$filter=startswith({LookupField},'" + encodeURIComponent(term) + "')&$top=10";
}"
csl:ShowNew="false"
ShowField="BdcIdentity"
List="{2f5a28ed-fd89-4cb5-8024-ae89defad50d}"
WebId="{a8d4e0de-9c70-467e-9105-2c5f1dbdb6b3}"
Mult="FALSE"
JSLink="~sitecollection/_layouts/15/plumsail/crosssitelookup/clienttemplates.js?field=TestColumnLookup"
Required="FALSE"
DisplayName="ExternalLookup"
Name="TestColumnLookup"
Type="Lookup"
ID="{35aba184-5e02-4cf2-9681-d64f5daef07f}"
SourceID="{a8d4e0de-9c70-467e-9105-2c5f1dbdb6b3}"
StaticName="TestColumnLookup" />
If i defnie it as a normal BusinessData column, but with the csl for crosssitelookup as JSLink, it dosnt render and im getting this error:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei XgFcmC1xTrcISwPFCT.SGUPD7vHtpq3qLiS8d..ctor(XDocument )
bei Plumsail.CrossSiteLookup.JSInitializer.RWUTGCZ4U(HttpContext )
The schema for this field looks like this:
Code: Select all
<Field Group="_MyGroup" xmlns:csl="Plumsail.CrossSiteLookup"
csl:NewContentType=""
csl:NewText=""
csl:ItemFormatResultTemplate="function(item) {
 return '<span class="csl-option">' + item["{LookupField}"] + ' - ' + item["Titel"] + '</span>';
}"
csl:RetrieveItemsUrlTemplate="function (term, page) {
 if (!term || term.length == 0){
 return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Titel&$orderby={LookupField} asc&$top=10";
 } return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Titel&$orderby={LookupField}&$filter=startswith({LookupField},'" + encodeURIComponent(term) + "')&$top=10";
}"
csl:ShowNew="false"
JSLink="~sitecollection/_layouts/15/plumsail/crosssitelookup/clienttemplates.js?field=TestColumnBusinessData"
Required="FALSE"
DisplayName="ExternalBusinessData"
Name="TestColumnBusinessData"
Type="BusinessData"
EnforceUniqueValues="FALSE"
ID="{0a7be7d8-efe5-4845-bce5-d330716f503a}"
SourceID="{a8d4e0de-9c70-467e-9105-2c5f1dbdb6b3}"
StaticName="TestColumnBusinessData"
Version="3"
SystemInstance="SQL_Archiv"
EntityNamespace="https://portal/teams/dev"
EntityName="Test_Content"
BdcField="Titel"
Profile=""
HasActions="True"
SecondaryFieldBdcNames="0"
RelatedField="Test_Content_ID12"
SecondaryFieldWssNames="0"
RelatedFieldBDCField=""
RelatedFieldWssStaticName="Test_Content_ID12"
SecondaryFieldsWssStaticNames="0" AddFieldOption="Default" />