From 5e702f63753e25074edb25b836f6a9b127995a6b Mon Sep 17 00:00:00 2001 From: manasa Date: Tue, 14 Jul 2026 15:44:30 +0530 Subject: [PATCH] Fixed the issue Opening a Data instance record from details view throwing error --- .../infra/Containers/ViewContainer/ViewContainer.tsx | 6 ++++-- .../src/components/infra/DeferLoad/DeferLoad.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/react-sdk-components/src/components/infra/Containers/ViewContainer/ViewContainer.tsx b/packages/react-sdk-components/src/components/infra/Containers/ViewContainer/ViewContainer.tsx index 53983545..1324334d 100644 --- a/packages/react-sdk-components/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +++ b/packages/react-sdk-components/src/components/infra/Containers/ViewContainer/ViewContainer.tsx @@ -153,13 +153,15 @@ export default function ViewContainer(props: ViewContainerProps) { const latestItem = items[key]; const rootView = latestItem.view; const { context, name: viewName } = rootView.config; + const target = key.substring(0, key.lastIndexOf('_')); const config: any = { meta: rootView }; config.options = { context: latestItem.context, pageReference: context || getPConnect().getPageReference(), containerName: getPConnect().getContainerName(), - containerItemName: key, - hasForm: viewName === CREATE_DETAILS_VIEW_NAME + containerItemID: key, + hasForm: viewName === CREATE_DETAILS_VIEW_NAME, + target }; const configObject: any = PCore.createPConnect(config); diff --git a/packages/react-sdk-components/src/components/infra/DeferLoad/DeferLoad.tsx b/packages/react-sdk-components/src/components/infra/DeferLoad/DeferLoad.tsx index e7302fab..6ba65768 100644 --- a/packages/react-sdk-components/src/components/infra/DeferLoad/DeferLoad.tsx +++ b/packages/react-sdk-components/src/components/infra/DeferLoad/DeferLoad.tsx @@ -69,7 +69,7 @@ export default function DeferLoad(props: DeferLoadProps) { const getViewOptions = () => ({ viewContext: resourceType, - pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional + pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal?.classID, // 2nd arg empty string until typedef allows optional container: isContainerPreview ? 'preview' : undefined, containerName: isContainerPreview ? 'preview' : undefined, updateData: isContainerPreview