Post

PCF Controls or JavaScript: Choose the Supported Fit

Diesen Beitrag auf Deutsch lesen

Choose PCF controls or JavaScript by matching the user experience, app context, maintainability and security needs.

TL;DR

Use PCF for reusable custom interfaces such as sliders, dials, calendars, maps or specialized data views. Use JavaScript for supported model-driven form events such as load, change and save. Check app and field support, package and test releases, and enforce critical rules server-side because client-side behavior does not secure data.

Original by Softchief Author, on Softchief Technologies. Read the original

This is our own summary, not a republication or full translation.

Governance takeaway

  • Makers: Choose PCF for a reusable custom interface and JavaScript for focused model-driven form behavior; use supported APIs and avoid direct DOM changes.
  • Admins/CoE: Define packaging, environment settings, release approval and long-term ownership before implementation, then test imported customizations in the target app.
  • Security/Compliance: Treat field hiding and browser validation as user guidance only; use platform permissions and server-side enforcement for critical data rules.

Frequently asked questions

When should I choose a PCF control and when JavaScript in Dynamics 365?

PCF builds custom interface components, while JavaScript usually adds client-side behaviour to model-driven app forms.

Is hiding a field with JavaScript enough to protect the data?

No. Hiding a field or checking its value in the browser does not secure the data.

Is Xrm.Page still recommended for new form code in Dynamics 365?

No. Microsoft marks the older Xrm.Page approach as deprecated and recommends formContext for new code where applicable.

This post is licensed under CC BY 4.0 by the author.