Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

How can I convert snippets on filesystem into records on entity list handling create, update, delete?

Posted on by 15

I would like to manage snippets with text and Liquid templates into my filesystem as separate files, manage them under source control, and be able to upload the to PowerApps Portal into the entity structure that PowerApps Portal uses.But I have to handle create/update/delete scenarios. A snippet looks like:

<record id="94496219-ddeb-4c10-8d83-524fb7952b8b">
<field name="adx_contentsnippetid" value="94496219-ddeb-4c10-8d83-524fb7952b8b"/>
<field name="adx_contentsnippetlanguageid" value="d9e7ed64-7337-47a8-af6e-35a783c2e2dd" lookupentityname="English" lookupentity="adx_websitelanguage"/>
<field name="adx_display_name" value="Footer"/>
<field name="adx_name" value="Footer"/>
<field name="statecode" value="0"/>
<field name="statuscode" value="1"/>
<field name="adx_type" value="756150001"/>
<field name="adx_value" value="&lt;p&gt;&lt;span&gt;&lt;b&gt;Copyright &lt;/b&gt;&#169; &lt;/span&gt;{{ now | date: &#39;yyyy&#39; }}&lt;span&gt;. All rights &lt;b&gt;reserved&lt;/b&gt;.&lt;br&gt;‌test - test - test ||&amp;nbsp;&lt;/span&gt;&lt;/p&gt;"/>
<field name="adx_websiteid" value="f46b70cc-580b-4f1a-87c3-41deb48eb90d" lookupentityname="Starter Portal" lookupentity="adx_website"/>
</record>

I would like to do it in a way that it does not intervene with snippets managed in the Portal, so for example prefix all snippets managed on the filesystem with _component_, because the snippets I want to create are as a replacement for components to be used in the PowerApps Portal by the citizen developer.I prefer to do it in PowerShell, so developers can easily extend it to their development needs.

  • Suggested answer
    oliver.rodrigues Profile Picture
    oliver.rodrigues 4,052 on at
    RE: How can I convert snippets on filesystem into records on entity list handling create, update, delete?

    In regards Source Control approach, are you using D365 Build Tools for CI/DI?

    marketplace.visualstudio.com/items

    the above contains tasks to be used with Configuration Migration tool from the SDK (search for Config Migration on the page), this will allow you to safely export/import/extract to source control the Portals metadata, Microsoft provides a schema configuration file for the Portals: docs.microsoft.com/.../migrate-portal-configuration

    For one of my projects, we have an On-Prem installation with ADX Portals, and we are not using CI/CD (yet), but we still have all custom code in Azure DevOps, this is just a simple project with the folders and files placed in the source control, nothing fancy, as a developer operation we make sure to always make changes in VisualStudio and manually copying across to CRM

    PortalData.PNG

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans