Skip to content

Commit 2198662

Browse files
authored
Merge pull request #192 from KnethM/182_update_navigateTo
Updated XRM.Navigation.navigateTo to be up to date
2 parents 246ce6e + fd0aed1 commit 2198662

1 file changed

Lines changed: 80 additions & 10 deletions

File tree

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

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

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

418-
interface PageInput {
419-
pageType: PageType
420-
416+
interface EntityList {
421417
/**
422-
* The data to pass to the web resource.
418+
* The type of the page.
423419
*/
424-
data?: string;
420+
pageType: "entitylist";
425421

426422
/**
427423
* The logical name of the entity to load in the list control.
428424
*/
429-
entityName?: string;
425+
entityName: string;
430426

431427
/**
432428
* The ID of the view to load. If you don't specify it, navigates to the default main view for the entity.
@@ -437,11 +433,85 @@ declare namespace Xrm {
437433
* Type of view to load. Specify "savedquery" or "userquery".
438434
*/
439435
viewType?: ViewType;
436+
}
437+
438+
interface EntityRecord {
439+
/**
440+
* The type of the page.
441+
*/
442+
pageType: "entityrecord";
443+
444+
/**
445+
* Logical name of the entity to display the form for.
446+
*/
447+
entityName: string;
448+
449+
/**
450+
* 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.
451+
*/
452+
entityId?: string;
453+
454+
/**
455+
* Designates a record that will provide default values based on mapped attribute values.
456+
*/
457+
createFromEntity?: Lookup;
458+
459+
/**
460+
* A dictionary object that passes extra parameters to the form.
461+
*/
462+
data?: object;
463+
464+
/**
465+
* ID of the form instance to be displayed.
466+
*/
467+
formId?: string;
468+
469+
/**
470+
* Indicates whether the form is navigated to from a different entity using cross-entity business process flow.
471+
*/
472+
isCrossEntityNavigate?: boolean;
473+
474+
/**
475+
* Indicates whether there are any offline sync errors.
476+
*/
477+
isOfflineSyncError?: boolean;
478+
479+
/**
480+
* ID of the business process to be displayed on the form.
481+
*/
482+
processId?: string;
483+
484+
/**
485+
* ID of the business process instance to be displayed on the form.
486+
*/
487+
processInstanceId?: string;
488+
489+
/**
490+
* Define a relationship object to display the related records on the form
491+
*/
492+
relationship?: EntityFormRelationship;
493+
494+
/**
495+
* ID of the selected stage in business process instance.
496+
*/
497+
selectedStageId?: string;
498+
}
499+
500+
interface WebResource {
501+
/**
502+
* The type of the page.
503+
*/
504+
pageType: "webresource";
440505

441506
/**
442507
* The name of the web resource to load.
443508
*/
444-
webresourceName?: string;
509+
webresourceName: string;
510+
511+
/**
512+
* The data to pass to the web resource.
513+
*/
514+
data?: string;
445515
}
446516

447517
const enum NavigationOptionsTarget {
@@ -499,7 +569,7 @@ declare namespace Xrm {
499569
* @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.
500570
* @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.
501571
*/
502-
navigateTo(pageInput: PageInput, navigationOptions: NavigationOptions): Promise<undefined>;
572+
navigateTo(pageInput: EntityRecord | EntityList | WebResource, navigationOptions?: NavigationOptions): Promise<undefined>;
503573

504574
/**
505575
* Displays an alert dialog containing a message and a button.

0 commit comments

Comments
 (0)