VMware {code} Community
SreeSindhuSruth
Enthusiast
Enthusiast

webplatform.getObjectId() property not available in fling

webplatform.getObjectId is not available in fling version.

Is there any alternative to retrieve the object id for object view?

3 Replies
SreeSindhuSruth
Enthusiast
Enthusiast

tried this.route.snapshot.params["id"];

Reply
0 Kudos
_vladi_
VMware Employee
VMware Employee

Hi,

WEB_PLATFORM.getObjectId is present is the Fling and all SDK samples are implemented based on it. Could it be that you are not correctly referring to the WEB_PLATFORM object?

Please have a look at the samples and web-platform.js for further reference.

Cheers,

Vladi

Reply
0 Kudos
SreeSindhuSruth
Enthusiast
Enthusiast

In flling sdk , globals.service.ts file has the following lines:

import { WebPlatform } from "./vSphereClientSdkTypes";

now in the vSphereClientSdkTypes.ts file

export interface WebPlatform {

   callActionsController(url: string, jsonData: string, targets?: string): void;

   closeDialog(): void;

   getClientType(): string;

   getClientVersion(): string;

   getString(bundleName: string, key: string, params: any): string;

   getRootPath(): string;

   getUserSession(): UserSession;

   openModalDialog(title, url, width, height, objectId): void;

   sendModelChangeEvent(objectId, opType): void;

   sendNavigationRequest(targetViewId, objectId): void;

   setDialogSize(width, height): void;

   setDialogTitle(title): void;

   setGlobalRefreshHandler(callback, document): void;

}

Can you please confirm.