Skip to content

Commit 1cf3a6f

Browse files
committed
Updates for change request
- removed type PageType - removed pageinput interface - added pageType variable to each individual interface - changed navigationOptions to be optional
1 parent 4aa23fe commit 1cf3a6f

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

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

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -411,15 +411,14 @@ declare namespace Xrm {
411411
savedEntityReference: Lookup[];
412412
}
413413

414-
type PageType = "entitylist" | "entityrecord" | "webresource";
415-
416414
type ViewType = "savedquery" | "userquery";
417415

418-
interface PageInput {
419-
pageType: PageType
420-
}
416+
interface EntityList {
417+
/**
418+
* The type of the page
419+
*/
420+
pageType: "entitylist";
421421

422-
interface EntityList extends PageInput {
423422
/**
424423
* The logical name of the entity to load in the list control.
425424
*/
@@ -436,7 +435,12 @@ declare namespace Xrm {
436435
viewType?: ViewType;
437436
}
438437

439-
interface EntityRecord extends PageInput {
438+
interface EntityRecord {
439+
/**
440+
* The type of the page
441+
*/
442+
pageType: "entityrecord";
443+
440444
/**
441445
* Logical name of the entity to display the form for.
442446
*/
@@ -493,7 +497,12 @@ declare namespace Xrm {
493497
selectedStageId?: string;
494498
}
495499

496-
interface WebResource extends PageInput {
500+
interface WebResource {
501+
/**
502+
* The type of the page
503+
*/
504+
pageType: "webresource";
505+
497506
/**
498507
* The name of the web resource to load.
499508
*/
@@ -560,7 +569,7 @@ declare namespace Xrm {
560569
* @param pageInput Input about the page to navigate to. The object definition changes depending on the type of page to navigate to: entity list or HTML web resource.
561570
* @param navigationOptions Options for navigating to a page: whether to open inline or in a dialog. If you don't specify this parameter, page is opened inline by default.
562571
*/
563-
navigateTo(pageInput: EntityRecord | EntityList | WebResource, navigationOptions: NavigationOptions): Promise<undefined>;
572+
navigateTo(pageInput: EntityRecord | EntityList | WebResource, navigationOptions?: NavigationOptions): Promise<undefined>;
564573

565574
/**
566575
* Displays an alert dialog containing a message and a button.

0 commit comments

Comments
 (0)