Created
September 26, 2017 07:24
-
-
Save gashupl/1c07b88c94e20fcbc6a40e058c37efbf to your computer and use it in GitHub Desktop.
Common.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <reference path="../Xrm/Form/account/Main/Information.d.ts" /> | |
| module Foo.Dyn365.Common { | |
| declare var Xrm; | |
| export class Form { | |
| constructor() { | |
| } | |
| getId(): string { | |
| return Xrm.Page.data.entity.getId(); | |
| } | |
| getValue(name) { | |
| let attribute = Xrm.Page.getAttribute(name); | |
| if (attribute == null) { | |
| return null; | |
| } else { | |
| return attribute.getValue(); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment