From b04c1dd1d0fe43a5010e69a7df555cbd423a0c36 Mon Sep 17 00:00:00 2001 From: Austin Turner Date: Sat, 21 Oct 2023 08:58:08 -0500 Subject: [PATCH] Namespace fields not included in record to apex For orgs with a namespace, apex was not working correctly as returned record included namespace fields but the namespace was stripped from the metadata. resolves #586 --- .../QueryResults/QueryResultsGetRecAsApexModal.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/apps/jetstream/src/app/components/query/QueryResults/QueryResultsGetRecAsApexModal.tsx b/apps/jetstream/src/app/components/query/QueryResults/QueryResultsGetRecAsApexModal.tsx index fabc0b567..6d543ae69 100644 --- a/apps/jetstream/src/app/components/query/QueryResults/QueryResultsGetRecAsApexModal.tsx +++ b/apps/jetstream/src/app/components/query/QueryResults/QueryResultsGetRecAsApexModal.tsx @@ -46,16 +46,8 @@ export const QueryResultsGetRecAsApexModal: FunctionComponent { - return { ...field, name: field.name.replace(replaceRegex, '') }; - }); - } const fieldTypeByApiName = metadata.data.fields.reduce((output: MapOf, field) => { - const replaceNamespace = org.orgNamespacePrefix ? `${org.orgNamespacePrefix}__` : ''; - output[field.name.replace(replaceNamespace, '')] = field.type; + output[field.name] = field.type; return output; }, {}); setLoading(false);