Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

Can't deploy app when using a field lookup on self list

$
0
0

Hello,

I'm developing a sharepoint-hosted application that embarks new colums, content type using those columns and a list instance based on said content type.

However when I want to deploy to my on-premise sharepoint site I got the following error :

CorrelationId: e4c9873d-90f3-467e-805a-a553915b7d19
ErrorDetail: There was a problem with activating the app web definition.
ErrorType: App
ErrorTypeName: App Related
ExceptionMessage: Cannot complete this action.

When searching SharePoint's logs via the correlation id, I found this relevant line :

Feature  schema contain wrong field name : feature name = 2ee8fcde-29e5-4eda-8b5c-f157ebe0f3e3, field name  Parent Role

I have read long about how it seems to be better using an event receiver but since the lookup browse the same list, the MSDN says that I can use "Self" for the "List" property. Here is my Field Definition :

<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/">  <Field
       ID="{d289f33c-eb1c-4bc2-a5d9-41ba3306ab6f}"
       Name="Parent Role"
       DisplayName="Parent Role"
       Type="Lookup"
       Required="FALSE"
       Group="Validators Role Columns"
       List="Self"
       Description="Parent Role"
       SourceID="http://schemas.microsoft.com/sharepoint/v3"
       ShowField="Title"></Field></Elements>

The Content Type Definition :

<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><!-- ContentType parent: Item (0x01) --><ContentType ID="0x0100C2368C0FF9AA4EABAB21A3342A066162" Name="Validator Role Type" Group="Types de contenu personnalisés" Description="A Role in the validating process" Inherits="TRUE" Version="0"><FieldRefs><FieldRef ID="{4936bb6b-0461-42a6-8ab8-037b4a0c5058}" DisplayName="Description" Required="FALSE" Description="Description of the Role" Name="ValidatorRoleDescription" /><FieldRef ID="{8825544e-5a53-4f04-8a1c-4b0f697de46b}" DisplayName="Members" Required="TRUE" Description="Users member of the Role" Name="Members" /><FieldRef ID="{d289f33c-eb1c-4bc2-a5d9-41ba3306ab6f}" DisplayName="Parent Role" Required="FALSE" Description="Parent Role" Name="Parent Role" /></FieldRefs></ContentType></Elements>

And the List Instance Schema :

<?xml version="1.0" encoding="utf-8"?><List xmlns:ows="Microsoft SharePoint" Title="Validator Roles" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/Validator Roles" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE"><MetaData><ContentTypes><ContentType ID="0x0100C2368C0FF9AA4EABAB21A3342A066162" Name="Validator Role Type" Group="Types de contenu personnalisés" Description="A Role in the validating process" Inherits="TRUE" Version="0"><FieldRefs><FieldRef ID="{4936bb6b-0461-42a6-8ab8-037b4a0c5058}" DisplayName="Description" Required="FALSE" Description="Description of the Role" Name="ValidatorRoleDescription" /><FieldRef ID="{8825544e-5a53-4f04-8a1c-4b0f697de46b}" DisplayName="Members" Required="TRUE" Description="Users member of the Role" Name="Members" /><FieldRef ID="{d289f33c-eb1c-4bc2-a5d9-41ba3306ab6f}" DisplayName="Parent Role" Required="FALSE" Description="Parent Role" Name="Parent Role" /></FieldRefs></ContentType></ContentTypes><Fields><Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" DisplayName="$Resources:core,Title;" Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" MaxLength="255" /><Field ID="{4936bb6b-0461-42a6-8ab8-037b4a0c5058}" Name="ValidatorRoleDescription" DisplayName="Description" Type="Text" Required="FALSE" Group="Validators Role Columns" Description="Description of the Role"></Field><Field ID="{8825544e-5a53-4f04-8a1c-4b0f697de46b}" Name="Members" DisplayName="Members" Type="UserMulti" Required="TRUE" Group="Validators Role Columns" Description="Users member of the Role"></Field><Field ID="{d289f33c-eb1c-4bc2-a5d9-41ba3306ab6f}" Name="Parent Role" DisplayName="Parent Role" Type="Lookup" Required="FALSE" Group="Validators Role Columns" List="Self" Description="Parent Role" SourceID="http://schemas.microsoft.com/sharepoint/v3" ShowField="Title"></Field></Fields><Views><View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE"><Toolbar Type="Standard" /><XslLink Default="TRUE">main.xsl</XslLink><RowLimit Paged="TRUE">30</RowLimit><ViewFields><FieldRef Name="LinkTitleNoMenu"></FieldRef></ViewFields><Query><OrderBy><FieldRef Name="Modified" Ascending="FALSE"></FieldRef></OrderBy></Query><ParameterBindings><ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" /><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" /></ParameterBindings></View><View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/generic.png?rev=23" Url="AllItems.aspx"><Toolbar Type="Standard" /><XslLink Default="TRUE">main.xsl</XslLink><JSLink>clienttemplates.js</JSLink><RowLimit Paged="TRUE">30</RowLimit><ViewFields><FieldRef Name="LinkTitle"></FieldRef><FieldRef Name="ValidatorRoleDescription" /><FieldRef Name="Members" /><FieldRef Name="Parent Role" /></ViewFields><Query><OrderBy><FieldRef Name="ID"></FieldRef></OrderBy></Query><ParameterBindings><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /></ParameterBindings></View></Views><Forms><Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /><Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /><Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /></Forms></MetaData></List>

Thanks for your help,

Eric Gaspard


Viewing all articles
Browse latest Browse all 8089

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>