Skip to content

Commit 29ca92c

Browse files
committed
Updated pageinput to individual objects
Changed object PageInput to individual objects EntityList, EntityRecord, WebResource.
1 parent cb9f997 commit 29ca92c

1 file changed

Lines changed: 73 additions & 10 deletions

File tree

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

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -411,22 +411,17 @@ declare namespace Xrm {
411411
savedEntityReference: Lookup[];
412412
}
413413

414-
type PageType = "entitylist" | "webresource";
414+
type PageType = "entitylist" | "entityrecord" | "webresource";
415415

416416
type ViewType = "savedquery" | "userquery";
417417

418-
interface PageInput {
418+
interface EntityList {
419419
pageType: PageType
420420

421-
/**
422-
* The data to pass to the web resource.
423-
*/
424-
data?: string;
425-
426421
/**
427422
* The logical name of the entity to load in the list control.
428423
*/
429-
entityName?: string;
424+
entityName: string;
430425

431426
/**
432427
* The ID of the view to load. If you don't specify it, navigates to the default main view for the entity.
@@ -437,11 +432,79 @@ declare namespace Xrm {
437432
* Type of view to load. Specify "savedquery" or "userquery".
438433
*/
439434
viewType?: ViewType;
435+
}
436+
437+
interface EntityRecord {
438+
pageType: PageType
439+
440+
/**
441+
* The logical name of the entity to load in the list control.
442+
*/
443+
entityName: string;
444+
445+
/**
446+
* ID of the entity record to display the form for. If you don't specify this value, the form will be opened in create mode.
447+
*/
448+
entityId?: string;
449+
450+
/**
451+
* Designates a record that will provide default values based on mapped attribute values.
452+
*/
453+
createFromEntity?: null; /* have to specify a lookup object */
454+
455+
/**
456+
* A dictionary object that passes extra parameters to the form.
457+
*/
458+
data?: null; /* Must be a dictionary objectthat passes extra parameters */
459+
460+
/**
461+
* ID of the form instance to be displayed.
462+
*/
463+
formId?: string;
464+
465+
/**
466+
* Indicates whether the form is navigated to, from a different entity using cross-entity business process flow.
467+
*/
468+
isCrossEntityNavigate?: boolean;
469+
470+
/**
471+
* Indicates whether there are any offline sync errors.
472+
*/
473+
isOfflineSyncError?: boolean;
474+
475+
/**
476+
* ID of the business process to be displayed on the form.
477+
*/
478+
processId?: string;
479+
480+
/**
481+
* ID of the business process instance to be displayed on the form.
482+
*/
483+
processInstanceId?: string;
484+
485+
/**
486+
* Define a relationship object to display the related records on the form
487+
*/
488+
relationship?: null; /* Must be relationship object to display related records*/
489+
490+
/**
491+
* ID of the selected stage in business process instance.
492+
*/
493+
selectedStageId?: string;
494+
}
495+
496+
interface WebResource {
497+
pageType: PageType
440498

441499
/**
442500
* The name of the web resource to load.
443501
*/
444-
webresourceName?: string;
502+
webresourceName: string;
503+
504+
/**
505+
* The data to pass to the web resource.
506+
*/
507+
data?: string;
445508
}
446509

447510
const enum NavigationOptionsTarget {
@@ -499,7 +562,7 @@ declare namespace Xrm {
499562
* @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.
500563
* @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.
501564
*/
502-
navigateTo(pageInput: PageInput, navigationOptions: NavigationOptions): Promise<undefined>;
565+
navigateTo(pageInput: EntityRecord | EntityList | WebResource, navigationOptions: NavigationOptions): Promise<undefined>;
503566

504567
/**
505568
* Displays an alert dialog containing a message and a button.

0 commit comments

Comments
 (0)