Custom field html displays as text

Advertisement
I am converting a custom field from a SharePoint 2007 version to SharePoint 2013. The field works correctly in SP2007. In SP2013 it has the correct information but displays as text instead of html. I have set the "disable-output-escaping" in the
xsl to "yes" but it does not help. Here the xml and xsl data for the field.
<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
  <FieldType>
    <Field Name="TypeName">PriorityIndicator2</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="TypeDisplayName">Priority Indicator</Field>
    <Field Name="TypeShortDescription">Priority Indicator</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="Sortable">TRUE</Field>
    <Field Name="AllowBaseTypeRendering">TRUE</Field>
    <Field Name="Filterable">TRUE</Field>
    <Field Name="FieldTypeClass">Company.WebParts.PriorityIndicator2, $SharePoint.Project.AssemblyFullName$</Field>
    <Field Name="FieldEditorUserControl">/_controltemplates/15/PriorityIndicator2FieldEditor.ascx</Field>
    <Field Name="CAMLRendering">TRUE</Field> 
    <RenderPattern Name="DisplayPattern">
 <Column HTMLEncode="FALSE" />
    </RenderPattern>   
  </FieldType>
</FieldTypes>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
                xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
                version="1.0"
                exclude-result-prefixes="xsl msxsl ddwrt"
                xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
                xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
                xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:SharePoint="Microsoft.SharePoint.WebControls"
                xmlns:ddwrt2="urn:frontpage:internal">
  <xsl:template match="FieldRef[@Name = 'PriorityIndicator2]" mode="Text_body">
    <xsl:param name="thisNode" select="." />
    <span style="background-color:lightgreen;font-weight:bold">
      <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes" />
    </span>
  </xsl:template >
</xsl:stylesheet>
Any help would be greatly appreciated.
Luis R. Lebron
Advertisement

Replay

Hi,
According to your post, my understanding is that the custom field not render html well.
As you have known, we can use the “disable-output-escaping” to render the html, however, it not works in your environment.
As a workaround, we can use JQuery to render the html, I have made a simple code snippets to achieve this scenario, you can refer to it.
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var theTDs = $("td[id='SPFieldCustom']");
//console.log(theTDs.html());
TDContent = theTDs.text();
//console.log(TDContent);
theTDs.html(TDContent);
</script>
Note: You should change the id to fit your environment.
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support

How to make a field in custom screen as display field in screen exit

Hi , I have created a screen exit for CO02 with a field for item text in header level as input field , when value is given and save button is cliked it gets updated in database but the problem is same field shows as input field in CO03 ( display mode

How to create OVS help for custom field in OIF?

Hi All, I have a requirement where i need to add custom field and display F4 help. I have added the custom field but how to add OVS search help to field as i need to pull data from db tables based on certain creteria. Please explain with steps. Thank

Custom field's text not getting displayed in standard report

Hi All, I have a requirement like this . There is a Custom field which we have added in a standard FICO report ie S_PL0_86000030 ( G/L Account - Balances ). The custom field is added through a report painter , while seeing the config of report painte

G/L Account Long Text Field in Display

Dear Sir, I want G/L Account long text field be displayed along with G/L account number in G/L Account line item display report (FBL3N) I cheched the layout, the option of G/L account number is available but option of G/L account Long text is not ava

Custom field to be displayed in shopping cart header

Hi, I have a requirement to add a custom field on the Shopping Cart header. We are working on SRM 7.0 version. Note 672960 says that the header fields cannot be displayed for the shopping cart. If you define fields on the header, they can only be fil

Importing into Address Book with Custom Fields from a Text File.

Hello I'm a teacher and like to create contacts for my students. The information that I want in each contact besides their name, email address and phone number are their student id's, semester enrolled, class number and class title. For these four fi

Customer fields do not display in cProj 4.5

Hello, I am trying to customize customer fields with the 'Define Field Groups for Customer Fields' IMG activity I am using following steps to do this: 1. Enhance database tables for customer fields 2. Create field groups for customer fields 3. Assign

F-47( down payment request) : how to display custom fields ?

Hello every body, Can you help with this problem? Actually, in my project we created custom fields that appear in the PO (ME21N), the MIGO and the MIR7 and MIRO transaction. Those fields are in the BSEG table but my problem is that I can't display th

Displaying change documents for custom fields  in FPP2

I have added a new subscreen to the Business partner via BUPT. The new fields are on a custom table. I have created change documents for the new fields and all that is working fine - details are being written to CDHDR/CDPOS as expected. In the standa

Custom Field value is not getting populated in Display mode

Hi Experts , I have created a custom field on sales tab for BP Role Bill to prty in BP transaction in SAP CRM. The problem i am facing is that , after i chose my sales area field value is not populating in first time no matter whether i am in display

Change of custom fields in header data

Hi Experts, How to change of custom fields in header data in frontend SRM for Process PO transaction ? Help is appreciable. Thank You. Regards,SunuThank you for your replies. There is one custom field in header data called 'SDN Number' of our PO for

Adding customer field to selection screen of RFKORD11 - Customer  Statement Printing Program:

Hello, We are required to add an important customer field to selection screen of customer statement printing program: RFKORD11 for our South African branch. Please advise us regarding this matter, is there a proper user-exit or a repair is needed? Ki

Display As Text (based on LOV, saves state)  "p_t03" was assigned by APEX

Hi All, I have an ITEM Name: P36_INT Display As: Display As Text (based on LOV, saves state) Output in my HTML: [input type="hidden" name="p_t03" value="YES" />[span id="P36_INT">Interior[/span>   'p_t03' w

"F4" search-help for custom field in PCUI

Hello all, Does anyone know how I can create my own simple F4-help for a custom field I have added to a custom Tab Page in the PCUI? It should show a selection from a custom table. I couldn't find an useable example in the PCUI-cookbook. Any ideas an

Custom fields for FV50 table control

Hello, The customer has a requirement to add 3 text fields to the table control in Transaction FV50. These fields are currently not available in the table control at all (I checked the Table settings Administrator). Further, no Screen/Transaction Var

Adding  custom fields in vt01

Hi, I need to  add custom  fields in tran  vt01, vt02, vt03    and these custom fields added in sap table vttp. thanksFirst step is to find the user exits available for VT01 transaction. Here is the program to find the exits for a given TCode REPORT

Multi line custom field badly saved to database

Hello community, we're fighting currently against a strange issue. All projects has some multi line custom fields to fill every week for project status. During this exercise, some of the comments seems not well saved to database. While coming back to

VA01- Custom field addition on item level (VBAP)

Hello Guys, Requirement is to add custom field to Sales Order item level. I have appended a Z structure in VBAP table, and then added the fields in 8459 screen of SAPMV45A program in a frame. Now the frame created is visible, but not the fields (labe

Adding custom fields to XD01 transaction

Hi All, I need to add custom fields to the Customer create transaction (XD01). Can anyone tell me the feasibility of having screen-exits or BADIs to acheive the same? I have searched for screen exits but could found none, and regarding BADI's i found