web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

formRun.updateWorkflowControls(); Object reference not set to an instance of an object.

(0) ShareShare
ReportReport
Posted on by 469

Hi,

We have created a customization to enable workflow in the periodic journals screen. We are using the standard Daily journal workflow for the periodic journals.

We are receiving the error "Object reference not set to an instance of an object." only for periodic journals where the workflow is completed and the logged in user is not the user who created the journal.

The error is coming at the function formRun.updateWorkflowControls(); 

The workaround I have is to ask the user to click show user-created only check box to make this error disappear. 

This error doesn't show for me as a system admin, hower this error will show to other system admin users. The only difference is that I have created the Daily journal workflow

pastedimage1676225773528v1.png

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at
    RE: formRun.updateWorkflowControls(); Object reference not set to an instance of an object.

    Hi Hossam,

    We don't have your custom code, and we can't reproduce this issue, so that we cannot investigate the cause of the error. It is recommended that you contact your develop colleague to debug the code and analyze the root cause.

  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: formRun.updateWorkflowControls(); Object reference not set to an instance of an object.

    Hi Hossam,

    Seems you already debugged the code and find out the method that is causing the issue. There is a variable named "workflowControl" on the method. Have you checked whether the buffer is having values or it is null?

    workflowControl variable is assigned a value in init method of FormRun class.

    Debug that method and find out what causing this issue.

    Thanks,

    Girish S.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 756 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 678

#3
Martin Dráb Profile Picture

Martin Dráb 526 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans