Skip to content

Commit

Permalink
Modified forms to support activity entity type
Browse files Browse the repository at this point in the history
  • Loading branch information
TomProkop committed Jun 12, 2024
1 parent e91da9b commit 5333e44
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 25 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ dotnet new pp-entity `

Add an existing *system table* to a solution:
```console
dotnet new pp-entity --Behavior Existing --IsSystemEntity true --LogicalName "account" --DisplayName "Account" --allow-scripts yes
dotnet new pp-entity `
--Behavior Existing `
--IsSystemEntity true `
--LogicalName "account" `
--DisplayName "Account" `
--allow-scripts yes
```

> [!TIP]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,14 @@
"defaultFormat": "d"
}
},
"14cardFormId": {
"type": "generated",
"generator": "guid",
"replaces": "14cardFormId",
"parameters": {
"defaultFormat": "d"
}
},
//Main Form IDs
"1mainFormId": {
"type": "generated",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,29 @@
<rows>
<row>
<cell id="{4cardFormId}" showlabel="true" locklevel="0">
<!--#if (EntityType == "Activity") -->
<labels>
<label description="Priority" languagecode="1033" />
</labels>
<control id="prioritycode" classid="{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}" datafieldname="prioritycode" disabled="false" />
<!--#else -->
<labels>
<label description="Status Reason" languagecode="1033" />
</labels>
<control id="statuscode" classid="{5D68B988-0661-4db2-BC3E-17598AD3BE6C}" datafieldname="statuscode" disabled="false" />
<!--#endif -->
</cell>
<cell id="{5cardFormId}" showlabel="true" locklevel="0">
<!--#if (EntityType == "Activity") -->
<labels>
<label description="Due Date" languagecode="1033" />
</labels>
<control id="scheduledend" classid="{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}" datafieldname="scheduledend" disabled="false" />
<!--#else -->
<labels>
<label description="" languagecode="1033" />
</labels>
<!--#endif -->
</cell>
<cell id="{6cardFormId}" showlabel="true" locklevel="0">
<labels>
Expand All @@ -53,6 +67,24 @@
<label description="Details" languagecode="1033" />
</labels>
<rows>
<!--#if (EntityType == "Activity") -->
<row>
<cell id="{8cardFormId}" showlabel="true" locklevel="0">
<labels>
<label description="Subject" languagecode="1033" />
</labels>
<control id="subject" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="subject" disabled="false" />
</cell>
</row>
<row>
<cell id="{9cardFormId}" showlabel="true" locklevel="0">
<labels>
<label description="Regarding" languagecode="1033" />
</labels>
<control id="regardingobjectid" classid="{F3015350-44A2-4aa0-97B5-00166532B5E9}" datafieldname="regardingobjectid" disabled="false" />
</cell>
</row>
<!--#else -->
<row>
<cell id="{8cardFormId}" showlabel="true" locklevel="0">
<labels>
Expand All @@ -61,34 +93,35 @@
<control id="examplepublisherprefix_name" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="examplepublisherprefix_name" disabled="false" />
</cell>
</row>
<!--#endif -->
</rows>
</section>
<section name="CardFooter" showlabel="false" columns="1111" showbar="false" id="{9cardFormId}" IsUserDefined="0">
<section name="CardFooter" showlabel="false" columns="1111" showbar="false" id="{10cardFormId}" IsUserDefined="0">
<labels>
<label description="Footer" languagecode="1033" />
</labels>
<rows>
<row>
<!--#if (IsOrganizationTypeEntity) -->
<cell id="{10cardFormId}" showlabel="true" locklevel="0">
<!--#if (!IsOrganizationTypeEntity) -->
<cell id="{12cardFormId}" showlabel="true" locklevel="0">
<labels>
<label description="Owner" languagecode="1033" />
</labels>
<control id="ownerid" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="ownerid" disabled="false" />
</cell>
<!--#endif -->
<cell id="{11cardFormId}" showlabel="true" locklevel="0">
<cell id="{12cardFormId}" showlabel="true" locklevel="0">
<labels>
<label description="Created On" languagecode="1033" />
</labels>
<control id="createdon" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="createdon" disabled="false" />
</cell>
<cell id="{12cardFormId}" showlabel="true" locklevel="0">
<cell id="{13cardFormId}" showlabel="true" locklevel="0">
<labels>
<label description="" languagecode="1033" />
</labels>
</cell>
<cell id="{13cardFormId}" showlabel="true" locklevel="0">
<cell id="{14cardFormId}" showlabel="true" locklevel="0">
<labels>
<label description="" languagecode="1033" />
</labels>
Expand All @@ -102,13 +135,24 @@
</tab>
</tabs>
</form>
<!--#if (Behavior == "New") -->
<IsCustomizable>0</IsCustomizable>
<CanBeDeleted>0</CanBeDeleted>
<LocalizedNames>
<LocalizedName description="MODEL_Information" languagecode="1033" />
<LocalizedName description="Default ExampleEntityDisplayName Card Form" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="A default card form" languagecode="1033" />
</Descriptions>
<!--#else -->
<IsCustomizable>1</IsCustomizable>
<CanBeDeleted>1</CanBeDeleted>
<LocalizedNames>
<LocalizedName description="Custom ExampleEntityDisplayName Card Form" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="A form for this entity." languagecode="1033" />
<Description description="A custom card form" languagecode="1033" />
</Descriptions>
<!--#endif -->
</systemform>
</forms>
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,29 @@
<columns>
<column width="100%">
<sections>
<section showlabel="true" showbar="false" IsUserDefined="0" id="{3mainFormId}" labelid="{4mainFormId}" name="generalsection">
<section showlabel="false" showbar="false" IsUserDefined="0" id="{3mainFormId}" labelid="{4mainFormId}" name="generalsection">
<labels>
<label description="GENERAL" languagecode="1033" />
</labels>
<rows>
<!--#if (EntityType == "Activity") -->
<row>
<cell id="{5mainFormId}" labelid="{6mainFormId}">
<labels>
<label description="Subject" languagecode="1033" />
</labels>
<control id="subject" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="subject" />
</cell>
</row>
<!--#else -->
<row>
<cell id="{5mainFormId}" labelid="{6mainFormId}">
<labels>
<label description="Name" languagecode="1033" />
</labels>
<control id="examplepublisherprefix_name" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="examplepublisherprefix_name" />
</cell>
<!--#endif -->
</row>
</rows>
</section>
Expand Down Expand Up @@ -80,21 +91,24 @@
<Everyone />
</DisplayConditions>
</form>
<!--#if (Behavior == "New") -->
<IsCustomizable>0</IsCustomizable>
<CanBeDeleted>0</CanBeDeleted>
<LocalizedNames>
<LocalizedName description="Default ExampleEntityDisplayName Main Form" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="A default main form" languagecode="1033" />
</Descriptions>
<!--#else -->
<IsCustomizable>1</IsCustomizable>
<CanBeDeleted>1</CanBeDeleted>
<LocalizedNames>
<!--#if (Behavior == "New") -->
<LocalizedName description="Default ExampleEntityDisplayName Form" languagecode="1033" />
<!--#else -->
<LocalizedName description="Custom ExampleEntityDisplayName Form" languagecode="1033" />
<!--#endif -->
<LocalizedName description="Custom ExampleEntityDisplayName Main Form" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<!--#if (Behavior == "New") -->
<Description description="Default main form" languagecode="1033" />
<!--#else -->
<Description description="Custom main form" languagecode="1033" />
<!--#endif -->
<Description description="A custom main form" languagecode="1033" />
</Descriptions>
<!--#endif -->
</systemform>
</forms>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
<label description="GENERAL" languagecode="1033" />
</labels>
<rows>
<!--#if (EntityType == "Activity") -->
<row>
<cell id="{3quickFormId}">
<labels>
<label description="Subject" languagecode="1033" />
</labels>
<control id="subject" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="subject" />
</cell>
</row>
<!--#else -->
<row>
<cell id="{3quickFormId}">
<labels>
Expand All @@ -27,7 +37,8 @@
<control id="examplepublisherprefix_name" classid="{4273EDBD-AC1D-40d3-9FB2-095C621B552D}" datafieldname="examplepublisherprefix_name" />
</cell>
</row>
<!--#if (IsOrganizationTypeEntity) -->
<!--#endif -->
<!--#if (!IsOrganizationTypeEntity) -->
<row>
<cell id="{4quickFormId}">
<labels>
Expand All @@ -45,13 +56,24 @@
</tab>
</tabs>
</form>
<!--#if (Behavior == "New") -->
<IsCustomizable>0</IsCustomizable>
<CanBeDeleted>0</CanBeDeleted>
<LocalizedNames>
<LocalizedName description="MODEL_Information" languagecode="1033" />
<LocalizedName description="Default ExampleEntityDisplayName Quick View Form" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="A default quick view form" languagecode="1033" />
</Descriptions>
<!--#else -->
<IsCustomizable>1</IsCustomizable>
<CanBeDeleted>1</CanBeDeleted>
<LocalizedNames>
<LocalizedName description="Custom ExampleEntityDisplayName Quick View Form" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="A form for this entity." languagecode="1033" />
<Description description="A custom quick view form" languagecode="1033" />
</Descriptions>
<!--#endif -->
</systemform>
</forms>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</row>
</grid>
<!--#else -->
<grid name="examplepublisherprefix_examplecustomentitys" jump="examplepublisherprefix_name" select="1" icon="1" preview="1">
<grid name="examplepublisherprefix_examplecustomentities" 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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@
<isdefault>1</isdefault>
<savedqueryid>{defaultViewId}</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>0</querytype>
<fetchxml>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@
<isdefault>1</isdefault>
<savedqueryid>{lookupViewId}</savedqueryid>
<layoutxml>
<grid name="examplepublisherprefix_examplecustomentitys" jump="examplepublisherprefix_name" select="1" icon="1" preview="0">
<!--#if (EntityType == "Activity") -->
<grid name="examplepublisherprefix_examplecustomentities" jump="subject" select="1" icon="1" preview="0">
<row name="examplepublisherprefix_examplecustomentity" id="activityid">
<cell name="subject" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#else -->
<grid name="examplepublisherprefix_examplecustomentities" jump="examplepublisherprefix_name" select="1" icon="1" preview="0">
<row name="examplepublisherprefix_examplecustomentity" id="examplepublisherprefix_examplecustomentityid">
<cell name="examplepublisherprefix_name" width="300" />
<cell name="createdon" width="125" />
</row>
</grid>
<!--#endif -->
</layoutxml>
<querytype>64</querytype>
<fetchxml>
Expand Down

0 comments on commit 5333e44

Please sign in to comment.