Skip to content

Commit 71d124e

Browse files
author
Mai An Krause Bernt
committed
Fixed merge conflicts with gh_master
2 parents e05fdcb + 9c591e5 commit 71d124e

6 files changed

Lines changed: 166 additions & 6 deletions

File tree

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Release Notes
2+
### 5.4.6 - March 26 2021
3+
* Added title to Xrm.navigateTo.navigationOptions (@ArsenAghajanyan)
4+
5+
### 5.4.5 - March 26 2021
6+
* Added typings for Knowledgebase Search control
7+
28
### 5.4.4 - March 05 2021
39
* Added setVisible to form items (@urossavelj)
410

src/XrmDefinitelyTyped/AssemblyInfo.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ open System.Reflection
77
[<assembly: AssemblyDescriptionAttribute("Tool to generate TypeScript declaration files for MS Dynamics 365/CRM client-side coding.")>]
88
[<assembly: AssemblyCompanyAttribute("Delegate A/S")>]
99
[<assembly: AssemblyCopyrightAttribute("Copyright (c) Delegate A/S 2017")>]
10-
[<assembly: AssemblyVersionAttribute("5.4.4")>]
11-
[<assembly: AssemblyFileVersionAttribute("5.4.4")>]
10+
[<assembly: AssemblyVersionAttribute("5.4.6")>]
11+
[<assembly: AssemblyFileVersionAttribute("5.4.6")>]
1212
do ()
1313

1414
module internal AssemblyVersionInformation =
@@ -17,5 +17,5 @@ module internal AssemblyVersionInformation =
1717
let [<Literal>] AssemblyDescription = "Tool to generate TypeScript declaration files for MS Dynamics 365/CRM client-side coding."
1818
let [<Literal>] AssemblyCompany = "Delegate A/S"
1919
let [<Literal>] AssemblyCopyright = "Copyright (c) Delegate A/S 2017"
20-
let [<Literal>] AssemblyVersion = "5.4.4"
21-
let [<Literal>] AssemblyFileVersion = "5.4.4"
20+
let [<Literal>] AssemblyVersion = "5.4.6"
21+
let [<Literal>] AssemblyFileVersion = "5.4.6"

src/XrmDefinitelyTyped/IntermediateRepresentation.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type ControlType =
7070
| SubGrid of string
7171
| WebResource
7272
| IFrame
73+
| KBSearch
7374

7475
type AttributeType =
7576
| Default of TsType
@@ -107,7 +108,7 @@ type ControlClassId =
107108
| Float | IFrame | Integer | Language | Lookup | MoneyValue | Notes
108109
| PartyListLookup | Picklist | RadioButtons | RegardingLookup | MultiPicklist
109110
| StatusReason | TextArea | TextBox | TickerSymbol | TimeZonePicklist | Url
110-
| WebResource | Map | Subgrid | QuickView | Timer
111+
| WebResource | Map | Subgrid | QuickView | Timer | KnowledgeBaseSearch
111112
| Other
112113
with override x.ToString() = x.GetType().Name
113114

src/XrmDefinitelyTyped/Interpretation/InterpretFormXml.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ let classIds =
4242
("E7A81278-8635-4D9E-8D4D-59480B391C5B", Subgrid)
4343
("9C5CA0A1-AB4D-4781-BE7E-8DFBE867B87E", Timer)
4444
("4AA28AB7-9C13-4F57-A73D-AD894D048B5F", MultiPicklist)
45+
("E616A57F-20E0-4534-8662-A101B5DDF4E0", KnowledgeBaseSearch)
4546
] |> List.map (fun (id,t) -> id.ToUpper(), t) |> Map.ofList
4647

4748
let getTargetEntities (tes: string option) (a: XrmAttribute option) =
@@ -140,6 +141,8 @@ let getControl (enums:Map<string,TsType>) entity (controlField:ControlField): X
140141
| RegardingLookup
141142
| Lookup -> ControlType.Lookup (getTargetEntities tes attribute)
142143

144+
| KnowledgeBaseSearch -> ControlType.KBSearch
145+
143146
// TODO: Figure out if the following should be special control types
144147
| Language
145148
| QuickView
@@ -238,7 +241,7 @@ let interpretFormXml (enums:Map<string,TsType>) (bpfFields: ControlField list op
238241
|> Seq.sortBy (fun (name, _, _) -> name)
239242
|> List.ofSeq
240243

241-
244+
242245
// Attributes and controls
243246
let controlFields =
244247
form.Descendants(XName.Get("control"))

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9-.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,11 @@ declare namespace Xrm {
558558
* Number. Specify 1 to open the dialog in center; 2 to open the dialog on the side. Default is 1 (center).
559559
*/
560560
position?: NavigationOptionsPosition;
561+
562+
/**
563+
* String. The dialog title on top of the center or side dialog.
564+
*/
565+
title?: string;
561566
}
562567

563568
/**

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9.1-.d.ts

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,151 @@ declare namespace Xrm {
9292
setVisible(visibility: boolean): void;
9393
}
9494

95+
type KBSeachControlMode = "Inline" | "Popout";
96+
97+
/**
98+
* Interface for a KBSearchResult returned on the method getSelectedResults from the KBSearchControl.
99+
* All Date objects will be in the current user's time zone and format.
100+
*/
101+
interface KBSearchResult {
102+
/**
103+
* The HTML markup containing the content of the article.
104+
*/
105+
answer(): string;
106+
107+
/**
108+
* The article ID in Dynamics 365.
109+
*/
110+
articleId(): string;
111+
112+
/**
113+
* The unique article ID in Dynamics 365.
114+
*/
115+
articleUid(): string;
116+
117+
/**
118+
* The date the article was created.
119+
*/
120+
createdOn(): Date;
121+
122+
/**
123+
* Indicates whether the article is associated with the parent record or not.
124+
*/
125+
isAssociated(): boolean;
126+
127+
/**
128+
* Date on which the article was last modified.
129+
*/
130+
lastModifiedOn(): Date;
131+
132+
/**
133+
* Support Portal URL of the article; blank if Portal URL option is turned off.
134+
*/
135+
publicUrl(): string;
136+
137+
/**
138+
* Indicates whether the article is in published state. True if published; otherwise False.
139+
*/
140+
published(): boolean;
141+
142+
/**
143+
* The title of the article.
144+
*/
145+
question(): string;
146+
147+
/**
148+
* The rating of the article.
149+
*/
150+
rating(): number;
151+
152+
/**
153+
* A short snippet of article content that contains the areas where the search query was hit.
154+
*/
155+
searchBlurb(): string;
156+
157+
/**
158+
* Link to the article in the Dynamics 365.
159+
*/
160+
serviceDeskUri(): string;
161+
162+
/**
163+
* The number of times an article is viewed on the portal by customers.
164+
*/
165+
timesViewved(): number;
166+
}
167+
168+
/**
169+
* Interface for a knowledge base search control.
170+
*/
171+
interface KBSearchControl extends BaseControl {
172+
/**
173+
* Add an event handler to the PostSearch event.
174+
* @param functionRef The function to add.
175+
*/
176+
addOnPostSearch(functionRef: (context?: ExecutionContext<this, undefined>) => any): void;
177+
178+
/**
179+
* Add an event handler to the OnResultOpened event.
180+
* @param functionRef The function to add.
181+
*/
182+
addOnResultOpened(functionRef: (context?: ExecutionContext<this, undefined>) => any): void;
183+
184+
/**
185+
* Add an event handler to the OnSelection event.
186+
* @param functionRef The function to add.
187+
*/
188+
addOnSelection(functionRef: (context?: ExecutionContext<this, undefined>) => any): void;
189+
190+
/**
191+
* Get the text used as the search criteria for the knowledge base management control.
192+
*/
193+
getSearchQuery(): string;
194+
195+
/**
196+
* Get the currently selected result of the search control; the one that is currently open.
197+
* @return The currently selected result.
198+
*/
199+
getSelectedResults(): KBSearchResult;
200+
201+
/**
202+
* Gets the count of results found in the search control.
203+
* @return The count of the search result.
204+
*/
205+
getTotalResultCount(): number;
206+
207+
/**
208+
* Opens a search result in the search control by specifying the result number.
209+
* @param resultNumber Numerical value specifying the result number to be opened. Required.
210+
* @param mode Specify "Inline" or "Popout". Optional. Defaults to "Inline".
211+
* @return Returns 1 if successful; 0 if unsuccessful; -1 if the specified resultNumber is not present, or if the specified mode is invalid.
212+
*/
213+
openSearchResult(resultNumber: number, mode?: KBSeachControlMode): number;
214+
215+
/**
216+
* Use this method to remove an event handler from the PostSearch event.
217+
* @param functionRef The function to remove.
218+
*/
219+
removeOnPostSearch(functionRef: Function): void;
220+
221+
/**
222+
* Remove an event handler from the OnResultOpened event.
223+
* @param functionRef The function to remove.
224+
*/
225+
removeOnResultOpened(functionRef: Function): void;
226+
227+
/**
228+
* Remove an event handler from the OnSelection event.
229+
* @param functionRef The function to remove.
230+
*/
231+
removeOnSelection(functionRef: Function): void;
232+
233+
/**
234+
* Set the text used as the search criteria for the knowledge base management control.
235+
* @param text The text for the search query.
236+
*/
237+
setSearchQuery(text: string): void;
238+
}
239+
95240
interface PageEntity<T extends AttributeCollectionBase> {
96241
/**
97242
* Adds a function to be called when save event has completed; either successfully or with a failure.

0 commit comments

Comments
 (0)