System.InvalidOperationException

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
FinC
Experienced Cover User
28 Posts
Experienced Cover User
Australia
Experienced Cover User

28Posts

4Kudos

0Solutions

Solved: Go to Solution

System.InvalidOperationException

Hi,

 

I am trying to finalise the FY19 PAYG Summaries and every time I get to the point of saving the EMPDUPE file it comes up with an error;

 

 

Code:
System.InvalidOperationException


Message:
An exception occurred while reading a database value for property 'EmployeePayrollDetailsUserDefinedEntitlementLine.Hours'. The expected type was 'System.Decimal' but the actual value was null.


Stack Trace
----------------------------------------
1 : System.InvalidOperationException
----------------------------------------
System.InvalidOperationException: An exception occurred while reading a database value for property 'EmployeePayrollDetailsUserDefinedEntitlementLine.Hours'. The expected type was 'System.Decimal' but the actual value was null. ---> System.NullReferenceException: Object reference not set to an instance of an object.

9 REPLIES 9
Haydes
MYOB Product Team
6,317 Posts
MYOB Product Team
Australia
MYOB Product Team

6,317Posts

1,108Kudos

903Solutions

Re: System.InvalidOperationException

Hi @FinC 

 

I've seen this error before, this can be fixed by running a script over the file. Depending on if the file is online or offline can depend if MYOB can run the script or if we can provide you a tool to run it over your file.

 

If your online, please post:

  • The Last 4 Digits of the MYOB Serial Number (Found in: Setup > Company Information)
  • The Company File ID (Found in: Help > About MYOB AccountRight)

We can then find your account based on the email address you signed in with and match the serial number by the last 4 numbers and run the script over the file.

 

If your file is offline, let us know so we can send you the tool.


Cheers,
Hayden
MYOB Product Team

Currently Working On:
Supplier Feeds | E-invoicing
In Tray
Previously Worked On:
MYOB Capture App | MYOB Invoices app
MYOB Support (2015-2019)


FinC
Experienced Cover User
28 Posts
Experienced Cover User
Australia
Experienced Cover User

28Posts

4Kudos

0Solutions

Re: System.InvalidOperationException

Hi Hayden,

 

Thanks for your response.

 

Last four digits serial: 1944

Company FIle ID: 1

 

FinC
Experienced Cover User
28 Posts
Experienced Cover User
Australia
Experienced Cover User

28Posts

4Kudos

0Solutions

Re: System.InvalidOperationException

Hi @Haydes,

 

Are you able to run the script while people are on our system? If so, please feel free to run it.
Also, if there are any other mods than can run the script if Hayden can't, as I need to process the file ASAP so I can close the payroll year to do the required updates for payroll tomorrow.

 

Much appreciated.

Andrew_Y
805 Posts
Former Staff
Former Staff

805Posts

0Kudos

78Solutions

Accepted Solution Solved

Re: System.InvalidOperationException

Hello @FinC FinC

 

Apologies for the delay in getting back to you.

 

I have now run that script for you against the aforementioned SN & CDF#  Please close and restart to see if it has been effective.

Cheers,
Andrew

MYOB Community Support

Online Help| Forum Search| my.MYOB| Download Page

Did my answer help?

Mark it as a SolutionHelpful? Leave a to tell others

FinC
Experienced Cover User
28 Posts
Experienced Cover User
Australia
Experienced Cover User

28Posts

4Kudos

0Solutions

Re: System.InvalidOperationException

Thank you very much for your assistance.

C_Fisher_MUB
Partner
2 Posts
Partner
Australia

2Posts

0Kudos

0Solutions

Re: System.InvalidOperationException

I am having this same problem could you please help me?

Charmaine Fisher

Andrew_Y
805 Posts
Former Staff
Former Staff

805Posts

0Kudos

78Solutions

Re: System.InvalidOperationException

Hello @C_Fisher_MUB 

 

We would be happy to see if we can help with your issue .

 

Please refer to the original post and provide the appropriate information so that we can confirm what your issue/error log indicates, and check if it applies to your situation. 

 

As with Hayden’s post  we would need the appropriate information from you as to which file it applies to, as well as the last 4 digits of your serial number before we can proceed.

 

If your file is offline, we will need to direct you to a different avenue for solving your issue.

Cheers,
Andrew

MYOB Community Support

Online Help| Forum Search| my.MYOB| Download Page

Did my answer help?

Mark it as a SolutionHelpful? Leave a to tell others

MattLewis
3 Posts
User

3Posts

0Kudos

0Solutions

Re: System.InvalidOperationException

Hi,

 

Can you pelase provide me with the script / solution for offline file error?

 

Matt Lewis

mattl@eastmans.com.au

0897215422

Gayathri
1,144 Posts
Former Staff
Former Staff

1,144Posts

0Kudos

122Solutions

Re: System.InvalidOperationException

Hi @MattLewis,

 

Thank you for the post! Welcome to the MYOB Community Forum.

 

Sorry for the delayed response. As you mentioned that your file is offline. Can you send a private message with the details:

  1. The serial number of the company file (Setup>>Company Information).
  2. Email Address
  3. Company File ID

 

Thank you.

Cheers,
Gayathri

MYOB Community Support

Online Help| Forum Search| my.MYOB| Download Page

Did my answer help?

Mark it as a SolutionHelpful? Leave a to tell others

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post