DEV Community

Cover image for PACX ⁓ Work with views
Riccardo Gregori
Riccardo Gregori

Posted on

PACX ⁓ Work with views

Following a request from a friend of mine, Federica, PACX has been extended with a whole new set of commands to manipulate views!

🆕 pacx view namespace

pacx view is a brand new namespace containing the new set of commands specifically designed to work with views via command line.

pacx view namespace

Let's take a quick look at them:

📃 pacx view list

This command shows the list of views related to a given table (specified via --table or -t argument).

pacx view list

By default it shows only the records belonging to SavedQuery table. You can specify to get data from the UserQuery table (or both) via --type (or -q) argument.

🔍 pacx view get

This command shows LayoutXml and FetchXml of a given saved or user query.

pacx view get

The nice thing about this command is you just need to specify the view name: it searches the view against all views in the system. If the view name is not unique, you can specify the --table (or -t) argument to remove any ambiguity.

By default it looks on SavedQueries, if you want to look for UserQueries you can do it via --type (or -q) argument.

pacx view delete

The name says it all. Deletes a view from the system. Just like the previous command, the view name is enough to detect the view to delete, unless there is more than one view with that given name. If the view name is not unique, you can specify the --table (or -t) argument to remove any ambiguity.

By default it looks on SavedQueries, if you want to look for UserQueries you can do it via --type (or -q) argument.

📝 pacx view rename

Changes the name of a given view.

pacx view rename

The behavior reflects the previous one: just type the view name, and the table only if there is any ambiguity. By default it looks on SavedQueries, if you want to look for UserQueries you can do it via --type (or -q) argument.

🧑‍🤝‍🧑 pacx view clone

This command generates a copy of a given view, with a new name. It can be used as baseline for customizing a new view starting from an existing one.

Really interesting is the --clean argument: it removes all filters from the new view, allowing you to start really from scratch.

⚒️ pacx view replicate

In a few words, XrmToolBox ViewLayoutReplicator for command line.

The official docs says it all:

pacx view replicate

💡 Conclusions

Drop a comment here if you like this new additions to PACX! Or feel free to use the Discussion tab on the official GitHub page to ask for more features!

See you on the next tool! 😉

Top comments (0)