SBX - Search With Button

SBX - Forum Post Title

Content Snippets in Javascript

Microsoft Dynamics CRM Forum

Sahithi asked a question on 7 Feb 2019 4:48 AM

Question Status

Suggested Answer

I have a requirement to show the Terms & Conditions on portal profile page.

So, I have been storing the T&C text in the contact field and showing that content in a modal.

Now, the requirement is to show the T&C based on the preferred language.

I thought of adding the T&C text in content snippets, but I don't have the faintest idea of how to display the content snippets in the javascript.

Can any of you suggest a way to achieve this? Is there any other way instead of:
1. storing the t&c text in a different entity with the language lookup and fetching that information using odata and displaying it in the modal

2. if I were to use content snippets, how would i use them in the script?

Reply
Oliver Rodrigues responded on 7 Feb 2019 7:46 AM
My Badges
Suggested Answer

to get a content snippet through JS use the following syntax:

var title = '{{ snippets["YOUR SNIPPET NAME"] }}';

Reply
Oliver Rodrigues responded on 7 Feb 2019 7:46 AM
My Badges
Suggested Answer

to get a content snippet through JS use the following syntax:

var title = '{{ snippets["YOUR SNIPPET NAME"] }}';

Reply

SBX - Two Col Forum

SBX - Migrated JS