Skip to content

Instantly share code, notes, and snippets.

View martonsagi's full-sized avatar

Márton Sági martonsagi

View GitHub Profile
@martonsagi
martonsagi / AL Language Analyzer Rules.md
Created March 25, 2021 15:00
AL Language Analyzer Rules
ID Title Severity Details
AL0100 Invalid Multiline Comment Error Unterminated multiline comment
AL0101 Invalid Decimal Literal Error Constant value '{0}' is outside the range for a Decimal
AL0102 Invalid Int64 Literal Error Constant value '{0}' is outside the range for a BigInteger
AL0103 Invalid Int32 Literal Error Constant value '{0}' is outside the range for an Integer
AL0104 Syntax Error Error Syntax error, '{0}' expected
AL0105 Identifier Expected K W Error Syntax error, identifier expected; '{1}' is a keyword
AL0106 For Statement To Or Down To Expected Error Syntax error, 'TO' or 'DOWNTO' expected
AL0107 Identifier Expected Error Syntax error, identifier expected
...
/// <summary>
/// Example: JsonStuff1('{ "MyKey": { "ElementValue": "Result" } }', 'MyKey.ElementValue', 'ElementValue');
/// </summary>
/// <param name="SourceObject">JSON as Text</param>
/// <param name="Path">JPath selector</param>
/// <param name="PropertyName">Requested Property name</param>
/// <returns></returns>
local procedure JsonStuff1(SourceObject: Text; Path: Text; PropertyName: Text): Text;
@martonsagi
martonsagi / RecordHelper.al
Created October 24, 2019 11:55
AL RecordHelper
codeunit xx RecordHelper_DSK
{
procedure Open(TableId: Integer)
begin
Open(TableId, false, CompanyName());
end;
procedure Open(Name: Text): Boolean
begin
exit(Open(Name, false, CompanyName()));
@martonsagi
martonsagi / app.html
Last active December 3, 2018 11:49
Aurelia Pipeline Authorization Example
<template>
<require from="nav-bar"></require>
<nav-bar router.bind="router"></nav-bar>
<main>
<div class="page-host">
<router-view></router-view>
@martonsagi
martonsagi / api.js
Last active October 30, 2018 09:15
Aurelia - Dynamic components with InlineView
export class Api {
loadTemplate(url) {
return new Promise((resolve, reject) => {
this.callRestApi(url)
.then(result => {
resolve({content: result, error: false});
})
.catch(e => {
console.log(`Could not load template`, e);
@martonsagi
martonsagi / app.html
Last active July 25, 2018 11:31
Dynamic custom components with Aurelia
<template>
<require from="./frame-slot"></require>
<require from="./frame-inline"></require>
<require from="./frame-innerhtml"></require>
<div class="panel panel-primary">
<div class="panel-heading">Slots</div>
<div class="panel-body">
<frame-slot>
@martonsagi
martonsagi / app.html
Created August 28, 2016 23:32
Inline template in custom aurelia component
<template>
<require from="./inline"></require>
<div class="container-fluid">
<h4 class="page-header">Inline template in custom component</h4>
<div class="form-group">
<label>Template:</label>
<input class="form-control" type="text" value.bind="customTemplate" />
</div>
@martonsagi
martonsagi / app.html
Last active September 29, 2017 21:18
Aurelia - Load array of Enum values
<template>
<require from="./enum-list"></require>
<require from="./keys-value-converter"></require>
<h2>Single Dropdown - Dynamic</h2>
<label>Type</label>
<select class="form-control" value.bind="selectedType">
<option repeat.for="mainKey of data | keys" value="${mainKey}">${mainKey}</option>
@martonsagi
martonsagi / app.html
Last active January 13, 2017 16:04 — forked from jdanyow/app.html
Aurelia Compose view-model.ref
<template>
<require from="./custom-component"></require>
<require from="./body-component"></require>
<require from="./footer-component"></require>
<h1>${message}</h1>
<body-component>
<compose view-model="./custom-component" view-model.ref="customVM"></compose>
@martonsagi
martonsagi / app.html
Last active December 29, 2016 10:09
Change list order in Aurelia
<template>
<require from="./list"></require>
<list items.bind="items"></list>
</template>