Skip to content

Commit

Permalink
Added activity savedqueries
Browse files Browse the repository at this point in the history
  • Loading branch information
TomProkop committed Jun 12, 2024
1 parent 0fce96a commit 07ed843
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Power Platform .NET Templates

> [!CAUTION]
> [!WARNING]
> This project is currently in a development phase and not ready for production use.
> While we actively use these tools internally, our aim is to share and collaborate with the broader community to refine and enhance their capabilities.
> We are in the process of gradually open-sourcing the code, removing internal dependencies to make it universally applicable.
Expand All @@ -9,6 +8,11 @@
If wish to use this project for your team, please contact us at [email protected] for a personalized onboarding experience and customization to meet your specific needs.

> [!CAUTION]
> Only use this if you understand the standard platform customization capabilities.
> Using these templates with parameter combinations other than those documented here might generate invalid source code, which could still be importable to Dataverse.
> In some situations, this could cause your environment to become irreversibly corrupted.
## Goal
The primary objective of this NuGet package is to help Power Platform developers scaffold Power Platform components using a code-first approach.

Expand Down Expand Up @@ -40,6 +44,9 @@ Add an existing *system table* to a solution:
dotnet new pp-entity --Behavior Existing --IsSystemEntity true --LogicalName "account" --DisplayName "Account" --allow-scripts yes
```

> [!TIP]
> You can add component schema validation to your build process using [Power Platform MSBuild targets](https://github.com/TALXIS/tools-devkit-build).
## Collaboration

We are happy to collaborate with developers and contributors interested in enhancing Power Platform development processes. If you have feedback, suggestions, or would like to contribute, please feel free to submit issues or pull requests.
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,34 @@
<isdefault>1</isdefault>
<savedqueryid>{advancedFindViewId}</savedqueryid>
<layoutxml>
<!--#if (EntityType == "Activity") -->
<grid name="resultset" jump="subject" select="1" icon="1" preview="1">
<row name="result" id="activityid">
<cell name="subject" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#else -->
<grid name="resultset" jump="examplepublisherprefix_name" select="1" icon="1" preview="1">
<row name="result" id="examplepublisherprefix_examplecustomentityid">
<cell name="examplepublisherprefix_name" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#endif -->
</layoutxml>
<querytype>1</querytype>
<fetchxml>
<!--#if (EntityType == "Activity") -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="activityid" />
<attribute name="subject" />
<attribute name="createdon" />
<order attribute="subject" descending="false" />
</entity>
</fetch>
<!--#else -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="examplepublisherprefix_examplecustomentityid" />
Expand All @@ -25,6 +44,7 @@
<order attribute="examplepublisherprefix_name" descending="false" />
</entity>
</fetch>
<!--#endif -->
</fetchxml>
<IntroducedVersion>1.0</IntroducedVersion>
<LocalizedNames>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,40 @@
<isdefault>1</isdefault>
<savedqueryid>{associatedViewId}</savedqueryid>
<layoutxml>
<!--#if (EntityType == "Activity") -->
<grid name="resultset" jump="subject" select="1" icon="1" preview="1">
<row name="result" id="activityid">
<cell name="subject" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#else -->
<grid name="examplepublisherprefix_examplecustomentitys" jump="examplepublisherprefix_name" select="1" icon="1" preview="1">
<row name="examplepublisherprefix_examplecustomentity" id="examplepublisherprefix_examplecustomentityid">
<cell name="examplepublisherprefix_name" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#endif -->
</layoutxml>
<querytype>2</querytype>
<fetchxml>
<!--#if (EntityType == "Activity") -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="activityid" />
<attribute name="subject" />
<attribute name="createdon" />
<order attribute="subject" descending="false" />
<filter type="and">
<condition attribute="statecode" operator="in">
<value>0</value>
<value>3</value>
</condition>
</filter>
</entity>
</fetch>
<!--#else -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="examplepublisherprefix_examplecustomentityid" />
Expand All @@ -28,6 +53,7 @@
</filter>
</entity>
</fetch>
<!--#endif -->
</fetchxml>
<IntroducedVersion>1.0</IntroducedVersion>
<LocalizedNames>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@
</layoutxml>
<querytype>0</querytype>
<fetchxml>
<!--#if (EntityType == "Activity") -->
<fetch version="1.0" mapping="logical" distinct="true">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="activityid" />
<attribute name="subject" />
<attribute name="createdon" />
<order attribute="subject" descending="false" />
<filter type="and">
<condition attribute="statecode" operator="in">
<value>0</value>
<value>3</value>
</condition>
</filter>
<link-entity name="activityparty" from="activityid" to="activityid" alias="aa">
<filter type="and">
<condition attribute="partyid" operator="eq-userid" />
</filter>
</link-entity>
</entity>
</fetch>
<!--#else -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="examplepublisherprefix_examplecustomentityid" />
Expand All @@ -28,10 +49,15 @@
</filter>
</entity>
</fetch>
<!--#endif -->
</fetchxml>
<IntroducedVersion>1.0</IntroducedVersion>
<LocalizedNames>
<!--#if (EntityType == "Activity") -->
<LocalizedName description="My Open ExampleEntityPluralDisplayName" languagecode="1033" />
<!--#else -->
<LocalizedName description="Active ExampleEntityPluralDisplayName" languagecode="1033" />
<!--#endif -->
</LocalizedNames>
</savedquery>
</savedqueries>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@
</layoutxml>
<querytype>64</querytype>
<fetchxml>
<!--#if (EntityType == "Activity") -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="activityid" />
<attribute name="subject" />
<attribute name="createdon" />
<filter type="and">
<condition attribute="statecode" operator="in">
<value>0</value>
<value>3</value>
</condition>
</filter>
</entity>
</fetch>
<!--#else -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="examplepublisherprefix_examplecustomentityid" />
Expand All @@ -27,6 +42,7 @@
</filter>
</entity>
</fetch>
<!--#endif -->
</fetchxml>
<IntroducedVersion>1.0</IntroducedVersion>
<LocalizedNames>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
<savedqueryid>{myRecordsViewId}</savedqueryid>
<querytype>8192</querytype>
<fetchxml>
<!--#if (EntityType == "Activity") -->
<fetch version="1.0" mapping="logical" output-format="xml-platform">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="activityid" />
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="ownerid" operator="eq-userid" />
</filter>
</entity>
</fetch>
<!--#else -->
<fetch version="1.0" mapping="logical" output-format="xml-platform">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="examplepublisherprefix_examplecustomentityid" />
Expand All @@ -21,6 +32,7 @@
</filter>
</entity>
</fetch>
<!--#endif -->
</fetchxml>
<IntroducedVersion>1.0</IntroducedVersion>
<LocalizedNames>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,37 @@
<isdefault>1</isdefault>
<savedqueryid>{quickFindViewId}</savedqueryid>
<layoutxml>
<!--#if (EntityType == "Activity") -->
<grid name="resultset" jump="subject" select="1" icon="1" preview="1">
<row name="result" id="activityid">
<cell name="subject" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#else -->
<grid name="resultset" jump="examplepublisherprefix_name" select="1" icon="1" preview="1">
<row name="result" id="examplepublisherprefix_examplecustomentityid">
<cell name="examplepublisherprefix_name" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#endif -->
</layoutxml>
<querytype>4</querytype>
<fetchxml>
<!--#if (EntityType == "Activity") -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="activityid" />
<attribute name="subject" />
<attribute name="createdon" />
<order attribute="subject" descending="false" />
<filter type="or" isquickfindfields="1">
<condition attribute="subject" operator="like" value="{0}" />
</filter>
</entity>
</fetch>
<!--#else -->
<fetch version="1.0" mapping="logical">
<entity name="examplepublisherprefix_examplecustomentity">
<attribute name="examplepublisherprefix_examplecustomentityid" />
Expand All @@ -31,6 +53,7 @@
</filter>
</entity>
</fetch>
<!--#endif -->
</fetchxml>
<IntroducedVersion>1.0</IntroducedVersion>
<LocalizedNames>
Expand Down
Empty file.

0 comments on commit 07ed843

Please sign in to comment.