Skip to content

Commit

Permalink
Update snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
SBalslev committed Dec 19, 2023
1 parent 96c4076 commit dc2b257
Show file tree
Hide file tree
Showing 12 changed files with 355 additions and 40 deletions.
20 changes: 20 additions & 0 deletions snippets/al.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,26 @@
],
"description": "Snippet: Business Event"
},
"Snippet: Internal Event": {
"prefix": "teventinternal",
"body": [
"[InternalEvent(${1:IncludeSender})]",
"local procedure ${0:MyProcedure}()",
"begin",
"end;"
],
"description": "Snippet: Internal Event"
},
"Snippet: External Business Event": {
"prefix": "teventexternal",
"body": [
"[ExternalBusinessEvent(${1:Name}, ${2:DisplayName}, ${3:Description}, ${4:Category}, ${5:Version})]",
"local procedure ${0:MyProcedure}()",
"begin",
"end;"
],
"description": "Snippet: External Business Event"
},
"Snippet: Caption ML": {
"prefix": "tcaptionml",
"body": [
Expand Down
15 changes: 15 additions & 0 deletions snippets/entitlement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Snippet: Entitlement": {
"prefix": "tentitlement",
"body": [
"entitlement \"${1:MyEntitlement}\"",
"{",
"\tType = ${2|Application,ApplicationScope,ConcurrentUserServicePlan,FlatRateServicePlan,Implicit,PerUserServicePlan,Role,Group|};",
"\tRoleType =${3|Delegated,Local|};",
"\tId = '${4:MyId}';",
"\tObjectEntitlements = \"${0:MyListofObjects}\";",
"}"
],
"description": "Snippet: Entitlement"
}
}
12 changes: 12 additions & 0 deletions snippets/interface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Snippet: Interface": {
"prefix": "tinterface",
"body": [
"interface ${1:MyInterface}",
"{",
"\tprocedure ${0:MyProcedure}();",
"}"
],
"description": "Snippet: Interface"
}
}
173 changes: 169 additions & 4 deletions snippets/page.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
],
"description": "Snippet: Page Field"
},
"Snippet: Group": {
"prefix": "tgroup",
"body": [
"group(${1:GroupName})",
"{",
"\t$0",
"}"
],
"description": "Snippet: Page Group"
},
"Snippet: Action": {
"prefix": "taction",
"body": [
Expand All @@ -72,6 +82,55 @@
],
"description": "Snippet: Page Action"
},
"Snippet: Selection-Aware Action": {
"prefix": "tactionselectionaware",
"body": [
"action(${1:ActionName})",
"{",
"\tScope = ${2|PageFilter,RepeaterRow,RepeaterSelection|};",
"\t",
"\ttrigger OnAction()",
"\tbegin",
"\t\t$0",
"\tend;",
"}"
],
"description": "Snippet: Selection-Aware Action"
},
"Snippet: Action Ref": {
"prefix": "tactionref",
"body": [
"actionref(${1:ActionRefName}; ${2:ActionName})",
"{",
"\t$0",
"}"
],
"description": "Snippet: Page Action Ref"
},
"Snippet: Custom Action": {
"prefix": "tcustomaction",
"body": [
"customaction(${1:CustomActionName})",
"{",
"\tApplicationArea = ${2|All,Basic,Suite,Advanced|};",
"\t$0",
"}"
],
"description": "Snippet: Page Custom Action"
},
"Snippet: System Action": {
"prefix": "tsystemaction",
"body": [
"systemaction(${1|Generate,Attach,Cancel,Ok,Regenerate|})",
"{",
"\ttrigger OnAction()",
"\tbegin",
"\t\t$0",
"\tend;",
"}"
],
"description": "Snippet: Page Custom Action"
},
"Snippet: User Control": {
"prefix": "tusercontrol",
"body": [
Expand All @@ -87,32 +146,46 @@
],
"description": "Snippet: Page User Control"
},
"Snippet: View": {
"Snippet: View Shared Layout": {
"prefix": "tview",
"body": [
"view(${1:ViewName})",
"{",
"\tCaption = '${2:ViewCaption}';",
"\tFilters = where(${3:TableFieldName} = filter(${0:FilterValue}));",
"}"
],
"description": "Snippet: Page View without layout changes"
},
"Snippet: View Detached Layout": {
"prefix": "tview",
"body": [
"view(${1:ViewName})",
"{",
"\tCaption = '${2:ViewCaption}';",
"\tFilters = where(${3:TableFieldName} = filter(${4:FilterValue}));",
"\tSharedLayout = false;",
"\t",
"\tlayout",
"\t{",
"\t\t$0",
"\t}",
"}"
],
"description": "Snippet: Page View"
"description": "Snippet: Page View with layout changes"
},
"Snippet: Part": {
"prefix": "tpart",
"body": [
"part(${1:PartName}; ${2:PartSource})",
"{",
"\tApplicationArea = ${3|All,Basic,Suite,Advanced|};",
"\t${0}",
"}"
],
"description": "Snippet: Page Part"
},
"Page of type list": {
"Page of type List": {
"prefix": "tpage",
"body": [
"page ${1:Id} ${2:PageName}",
Expand Down Expand Up @@ -149,7 +222,7 @@
"\t\t\t{",
"\t\t\t\tApplicationArea = ${3};",
"\t\t\t\t",
"\t\t\t\ttrigger OnAction();",
"\t\t\t\ttrigger OnAction()",
"\t\t\t\tbegin",
"\t\t\t\t\t$0",
"\t\t\t\tend;",
Expand Down Expand Up @@ -192,5 +265,97 @@
"}"
],
"description": "Snippet: Page of type API"
},
"Page of type Role Center": {
"prefix": "tpage",
"body": [
"page ${1:Id} ${2:RoleCenterName}",
"{",
"\tPageType = RoleCenter;",
"\t",
"\tlayout",
"\t{",
"\t\tarea(RoleCenter)",
"\t\t{",
"\t\t\t$0",
"\t\t}",
"\t}",
"\t",
"\tactions",
"\t{",
"\t\tarea(Creation)",
"\t\t{",
"\t\t\taction(${3:ActionBarAction})",
"\t\t\t{",
"\t\t\t\tRunObject = ${4|Page,Report,XmlPort,Codeunit|} ${5:ObjectName};",
"\t\t\t}",
"\t\t}",
"\t\tarea(Sections)",
"\t\t{",
"\t\t\tgroup(${6:SectionsGroupName})",
"\t\t\t{",
"\t\t\t\taction(${7:SectionsAction})",
"\t\t\t\t{",
"\t\t\t\t\tRunObject = ${8|Page,Report,XmlPort,Codeunit|} ${9:ObjectName};",
"\t\t\t\t}",
"\t\t\t}",
"\t\t}",
"\t\tarea(Embedding)",
"\t\t{",
"\t\t\taction(${10:EmbeddingAction})",
"\t\t\t{",
"\t\t\t\tRunObject = ${11|Page,Report,XmlPort,Codeunit|} ${12:ObjectName};",
"\t\t\t}",
"\t\t}",
"\t}",
"}"
],
"description": "Snippet: Page of type Role Center"
},
"Page of type PromptDialog": {
"prefix": "tpage",
"body": [
"page ${1:Id} ${2:PageName}",
"{",
"\tPageType = PromptDialog;",
"\tCaption = '{3:Draft with Copilot}';",
"\tPromptMode = ${4|Prompt,Generate,Content|};",
"\tExtensible = false;",
"\tSourceTable = ${5:TableName};",
"\tSourceTableTemporary = true;",
"\t",
"\tlayout",
"\t{",
"\t\tarea(Prompt)",
"\t\t{",
"\t\t\t$6",
"\t\t}",
"\t\tarea(PromptOptions)",
"\t\t{",
"\t\t\t$7",
"\t\t}",
"\t\tarea(Content)",
"\t\t{",
"\t\t\t$8",
"\t\t}",
"\t}",
"\t",
"\tactions",
"\t{",
"\t\tarea(SystemActions)",
"\t\t{",
"\t\t\tsystemaction(${9|Generate,Attach,Cancel,Ok,Regenerate|})",
"\t\t\t{",
"\t\t\t\ttrigger OnAction()",
"\t\t\t\tbegin",
"\t\t\t\t\t$0",
"\t\t\t\tend;",
"\t\t\t}",
"\t\t}",
"\t}",
"\t",
"}"
],
"description": "Snippet: Page of type Prompt Dialog"
}
}
15 changes: 15 additions & 0 deletions snippets/permissionset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Snippet: PermissionSet": {
"prefix": "tpermissionset",
"body": [
"permissionset ${1:Id} ${2:MyPermissionSet}",
"{",
"\tAssignable = ${3|true,false|};",
"\tIncludedPermissionSets = ${4:SomePermissionSet};",
"\tPermissions = ",
"\t\t${5:ObjectType} ${6:ObjectName} = ${7:ObjectPermissions};",
"}"
],
"description": "Snippet: Permission Set"
}
}
14 changes: 14 additions & 0 deletions snippets/permissionsetextension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Snippet: PermissionSetExtension": {
"prefix": "tpermissionsetextension",
"body": [
"permissionsetextension ${1:Id} ${2:MyPermissionSetExt} extends ${3:MyTargetPermissionSet}",
"{",
"\tIncludedPermissionSets = ${4:SomePermissionSet};",
"\tPermissions = ",
"\t\t${5:ObjectType} ${6:ObjectName} = ${7:ObjectPermissions};",
"}"
],
"description": "Snippet: Permission set extension"
}
}
15 changes: 14 additions & 1 deletion snippets/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@
"body": [
"profile ${1:MyProfile} ",
"{",
"\tDescription = ${2:'Profile Display Name'};",
"\tDescription = '${2:Profile Display Name}';",
"\tRoleCenter = ${3:RoleCenter};",
"\tCustomizations = ${0:Customizations};",
"}"
],
"description": "Snippet: Profile"
},
"Snippet: Profile (4.0)": {
"prefix": "tprofile",
"body": [
"profile ${1:MyProfile} ",
"{",
"\tCaption = '${2:Profile Display Name}';",
"\tRoleCenter = ${3:RoleCenter};",
"\tProfileDescription = '${4:Profile Description}';",
"\tCustomizations = ${0:Customizations};",
"}"
],
"description": "Snippet: Profile"
}
}
Loading

0 comments on commit dc2b257

Please sign in to comment.