L'attributo RichTextMode viene ignorato quando applicato
-
10-12-2019 - |
Domanda
Nella mia soluzione, ho definito un campo personalizzato e un tipo di contenuto.Il campo è definito come segue
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field ID="{5f4f08ad-7f5b-4d5d-879c-50b417acae3d}"
Name="TaskActionComment"
StaticName="TaskComment"
DisplayName="Comment"
Type="Note"
RichText="TRUE"
RichTextMode="FullHtml"
Required="FALSE"
Group="Knowledge Base Article Columns">
</Field>
</Elements>
.
e il tipo di contenuto è definito come segue
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Workflow Task (0x010801) -->
<ContentType ID="0x010801003EE4B5580C5846B6BE74BFC41A663388"
Name="Technical Review Task"
...
Inherits="FALSE"
Version="0">
<FieldRefs>
...
<FieldRef ID="{5f4f08ad-7f5b-4d5d-879c-50b417acae3d}"
Name="ActionComment" />
</FieldRefs>
<XmlDocuments>
...
</XmlDocuments>
</ContentType>
</Elements>
.
Quando utilizzo l'interfaccia utente per confermare le definizioni dopo la distribuzione, il campo sembra corretto.
Ma quando aggiungo il tipo di contenuto all'elenco dei miei compiti e guardo guarda la definizione della colonna per l'elenco che ottengo
Cosa sto facendo male?
Soluzione
I figured it out. It looks like it was a SharePoint "retention" issue. It seems that retracting a solution does not truly remove everything.
Using SharePoint Manager 2013, I was able to see that the Comment
field was still defined in the List
even though the Content Types
were removed from the List and the solution was retracted. In addition, when the solution gets re-deployed, SharePoint sees that the column already exists in the List and uses that previous definition instead of the defined attributes in the solution.
Go figure...
Altri suggerimenti
You refer to your custom field "TaskActionComment" as simply "ActionComment" in the content type definition. Amend the content type reference to the field to "TaskActionComment" and test again. Hope that's it!