Difference between formContext.getControl() and formContext.getAttribute() in Dynamics 365
🟡 formContext.getControl('xyz').getValue() ❌ Invalid usage – This is not correct and will throw an error. ✅ Example usage of getControl() (correct): formContext.getControl("xyz").setVisible(false); // Hides the controlformContext.getControl("xyz").setDisabled(true); // Disables the control formContext.getAttribute('xyz').getValue() ✔️ Correct usage – This is how you get the actual data value of the field. ✅ Example: var value = formContext.getAttribute(“xyz”).getValue(); // Gets … Continue reading Difference between formContext.getControl() and formContext.getAttribute() in Dynamics 365
This was originally posted here.
*This post is locked for comments