Skip to main content



No record found.

Microsoft Dynamics CRM forum

Script Error when loading form

Posted on by 50
Hello, I created a form in D365 and it loads fine 90% of the time.  Occasionally if I open my browser and go to a record very quickly there will be a script error.
/Cannot read properties of null (reading 'getValue')/
Event Name: onload
Function Name: showItems
function showItems() {
var activeProcess =;
var activeProcessId = activeProcess.getId();
if(activeProcessId = /value/)
//do stuff
return false;
The script is use along with some buttons I am hiding using Ribbon Workbench.  I tried adding a delay, but then it intefers with hiding the button.  It works great as long as it loads properly, but will have issue if the form is not given time to load properly it seems.

Any suggestions?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,513 Super User

Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans