Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 

I have a requirement on Knowledge article to integrate it with Portal but I am having some issues which I mentioned in another post. So, I won't be able to use the Knowledge article with the current license but I was thinking to create a Custom Entity and create a Multiline Text field to store the HTML content like how Web Page & Web Template Entity store. But I have to create a model-driven app, so that some specific users can add the post or announcement and different languages like Spanish and English.

So, can I handle that?

Also in the Form how can I add a Component to having an HTML and Design view for the end-user to add the post or announcement:
HTML ComponentHTML Component

 

Please help me with this. Any Help will be appreciable.

 

Thanks,

Amit

  • Community Power Platform Member Profile Picture
    on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @hardikv 

    Thanks for your response!

     

    Yes, it was because of Entity permission was not given. It is resolved now. But there is some other issue for which I will create a new thread.

     

    Thanks,

    Amit

  • H V Profile Picture
    1,510 on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @Anonymous 

     

    Did you give entity permission for cre08_customknowledgearticle entity?

    --------------------------
    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

  • H V Profile Picture
    1,510 on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @Anonymous 

    It seems that you have entered wrong entity name:

    {% assign KAGUID = entities.cre08_customknowledgearticleid['a5e838r1-d0cc-ea11-a812-016d4sb148ga'] 

    You have added cre08_customknowledgearticleid as entity name, but It look a like logical name of field. So, you should add there Logical Name of Entity.

     

    It will be like this:

    {% assign KAGUID = entities.cre08_customknowledgearticle['a5e838r1-d0cc-ea11-a812-016d4sb148ga'] 

     

    -------------

    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @hardikv @OOlashyn 

    Thanks for all your response!

     

    I have created one custom Entity called "Custom Knowledge Article" where I have added the "Content" multiline text field, language lookup field and some other fields.

    While I was going through @hardikv links, meantime I had done some research on the form which is present in Web Page Entity and found that in that form the Rich Text control is nothing but Web Resouce. So, in my main information form, I have included one Web Resource and given the exact same properties as web page form (except some).

    And the Rich text is working perfectly, the data is inserting perfectly with the correct HTML script. My form is working perfectly and I included that to my model-driven app.

     

    Web Resource for Content HTML in Custom KAWeb Resource for Content HTML in Custom KA

     

    The form is getting the Rich Text:

    Rick Tect in KA formRick Tect in KA form

     

    I added a few data to the Entity from the form:

    Custom KS entity storing data correctlyCustom KS entity storing data correctly

     

    But I am facing one issue when trying to read the data using Liquid code. I am not able to understand why I am not able to fetch the data. The liquid code looks perfect. Below is the code for the same for a single record present in the Entity.(just for checking purpose):

     

    {% assign KAGUID = entities.cre08_customknowledgearticle['a5e838r1-d0cc-ea11-a812-016d4sb148ga'] %} // this GUID is wrong but I have used correct one while doing my fecth
    
     {% if KAGUID %}
     {
     "KA_ID": "{{ KAGUID.cre08_customknowledgearticleid}}",
     "KA_Number": "{{ KAGUID.cre08_kanumber}}",
     "KA_Keyword": "{{ KAGUID.cre08_keyword}}",
     "KS_Desc": "{{ KAGUID.cre08_description}}",
     "KA_Content": "{{ KAGUID.cre08_content}}",
     "KA_Createdon": "{{ KAGUID.createdon}}"
    
     }
     {% else %}
     
     { "success" : false }
    
     {% endif %}
     

     

     My web template is in application/json MIME type.

    I am getting below as output:

    { "success" : false }

     I am not able to understand where I am doing mistake.

     

    Could you please help me to solve the issue? Any help will be appreciable.

    Thanks,

    Amit

  • H V Profile Picture
    1,510 on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @Anonymous

    Please download zip file from below link and import that zip in Dynamics 365.

    https://github.com/andz88/PCF.TinyMCE/blob/master/Release/TinyMCEComponent.zip

    - Go to Settings in Dynamics 365

    - Solutions

    - Click on Import button and select downloaded zip file

    - Publish all customization

     

    Please refer below blog to add PCF control in the form. 

    https://www.itaintboring.com/dynamics-crm/pcf-controls-now-i-have-my-first-pcf-control-too/

     

    -----------------------------

    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

     

  • Community Power Platform Member Profile Picture
    on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @OOlashyn 

    Thanks for your response!

    I went to the PCF link which you shared but I didn't get a clear idea on how to include that in form. what all are the steps that need to perform. Is there any proper blog or article on the same?

     

    Thanks,

    Amit

     

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at
    Re: How to use Custom Entity Field to Store HTML scripts and handle Multi Language like Knowledge Base Article

    Hi @Anonymous ,

     

    There is no ootb editor component that you can add. However, there are a lot of PCF components that you can use for this purpose - for example, this one. Also, keep in mind that the multiline field has maximum length of 1,048,576 characters. 

     

    Regarding handling content in different languages -  you will need to create and handle the logic for it by yourself. For example, adding lookup to Portal Language and then use liquid to get the portal language and fetch proper version, something like that.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35