DX API Security Validation Error and pzGetViewFieldsMap unable to accept the Modified Version of view

DX API Field Security Validation Error (1).pdf (29.7 KB)

This is a field security validation mismatch between what the UI submits and what Constellation’s view metadata whitelist includes.
from your logs, pzGetViewFieldsMap() generates the field whitelist and includes PolicyPanelCertDocs.* (Embedded Data, Multiple Records), It does not include PolicyPanelCertDocsRecord (Embedded Data, Single Record) But the submitted content clearly contains PolicyPanelCertDocsRecord = true and PolicyPanelCertDocsRecord.FormNumber

So the validator receives PolicyPanelCertDocsRecord.FormNumber, but the whitelist only has PolicyPanelCertDocs.*, causing the 401/400-style field security failure.

verify below-

  1. Confirm view metadata and compiled view for ‘GeneratePolicyPanelCert’ and ensure PolicyPanelCertDocsRecord is explicitly present on the view and ensure the field FormNumber is configured as visible and included in the view (not just behind a conditional or hidden).
    If PolicyPanelCertDocsRecord is not explicitly part of the view definition (even if it shows up in the UI via section rendering), pzGetViewFieldsMap() may not include it in the whitelist.
  2. Confirm that the view is directly bound to the page that contains PolicyPanelCertDocsRecord. Ensure the primary page is your work object (MyCo-Work-Placement-Panel). Ensure the embedded page PolicyPanelCertDocsRecord is initialized before the view is rendered. If PolicyPanelCertDocsRecord is created via a data transform or activity, verify that the page is created before the view is rendered and the name is exactly PolicyPanelCertDocsRecord on the primary.
  3. In the class MyCo-Work-Placement-Panel, Confirm that PolicyPanelCertDocsRecord is defined as Embedded Data (Single Record) and Confirm that FormNumber is a property on the embedded page class.
  4. In the DX API request, the JSON path should be in the format of “PolicyPanelCertDocsRecord”: { “FormNumber”: “…” }.

This pattern is consistent with metadata-related field security issues in Constellation

The problem is that its working fine in Dev and failing in STG. And also in the payload I can see both pages but I dont see PolicyPanelCertDocsRecord in oFieldsMap

Could you open the view in Dev Studio and paste here what is present in the Context Metadata? The page you are referring should be present in it

Could you please let us know which API causing this issue? Case or Assignment? Again, if it’s realted to Case creation API, did you configure the AllowStartingfields Data transform to add the Custom properties?

When I commented the step from pzCheckFieldSecurity its working fine . This seems to be a bug in DX constellation where the payload to ofield mapping is not happening properly

On further investigation, I found that there is issue in ViewFieldMapping , do not know why for the same content payload its giving different output

Can anyone from Pegasystems help in resolving the issue. Or do I need to raise an SR

@BalajiC7 Could you Re-save and regenerate the view metadata in the failing environment. Compare the compiled view metadata between DEV and STG2 and ensure that there is no override or stale rule version in STG2 and also check whether the same embedded data structure is present and bound identically in both environments.

Check whether the embedded single-record section PolicyPanelCertDocsRecord is being treated differently in the target environment and confirm there are no differences in class mapping, view version, embedded page initialization or any environment-specific rule override. This is not a Product bug because the fact that the same content produces different field maps across environments usually points first to a configuration or metadata synchronization difference

I believe I did that , I will try again and see. The input go to pzGetViewFieldsMap is same , and this function is abstract . If we can know what is happening , may be we can find a resolution. Stale metadata could be a reason , I resaved in another version and exported but no luck . Is there hidden cache that we need to remove