Using pac portal to deploy portal between environments. Want to exclude certain records

468 views Asked by At

Using pac portal to push changes between environments. Following the instructions mentioned here. https://learn.microsoft.com/en-us/power-apps/maker/portals/power-apps-cli

Have a specific to exclude certain adx weblinks records from getting pushed. Is there a way to do so? Other than downloading the portal data and deleting the records first?

We use Azure devops to perform the operations. If that helps.

Really appreciate your help and time.

Thanks!

2

There are 2 answers

0
Elisa On

Not sure how to remove the weblinks, but could you solve your problem by changing the weblink 'Publishing Status' from 'Published' to 'Draft' instead? Resulting in the weblinks becoming hidden from public after deployment? This can be done in a deployment profile for your target environment (tutorial here)

Look up the GUID for the 'Draft' 'Publishing State' (in Portal Management App go to 'Websites', select your website, then pick 'Related' tab and 'Publishing States', click on 'Draft' and pull the Id from the URL e.g &id=14ea80af-db7f-ec11-8d21-00224815aec9)

Then in your dev.deployment.yml file you can add something like:

  adx_weblink:
  - adx_weblinkid: 95f37310-3489-ec11-9390-002248154727
    adx_publishingstateid: 14ea80af-db7f-ec11-8d21-00224815aec9
  - adx_weblinkid: 349175f7-3389-ea11-93b0-002248154627
    adx_publishingstateid: 14ea80af-db7f-ec11-8d21-00224815aec9

Where adx_weblinkid is the GUID of a weblink you want to hide and adx_publishingstateId is the GUID for the 'Draft' Publishing State. Then when you do your 'pac paportal upload' dont forget to include the '--deploymentProfile dev' flag so the dev.deployment.yml file gets used.

0
Hugo Bernier On

You can use Deployment profiles to set and override environment-specific settings when you deploy. That way, you don't need to manually make changes every time you deploy.

I hope this helps?!