Unable to update record for a custom module linked to User module

We have a custom module Staff (pkg1_staff) that has a one to one relationship with Users.

We can create a staff record and it correctly links the id with the users id and both are in pkg1_staff_users_c

When we try to update a Staff record, it fails in LineItemMapper.php::toBean function because the correct user id is passed in, but it is not an array nor a map with [‘id’,‘idvalue’]

What is your PHP version, and the exact PHP error as found in php_errors.log?

My PHP version is 7.4.6

No errors reported on the error log, however, I see this error on the network tab on the browser:

Warning: Invalid argument supplied for foreach()

And there is a traceback that points to the LineItemMapper.php::toBean

LineItem is something related to Invoices? What kind of custom module is this?

Or are you on SuiteCRM v8? I’m not sure but LineItem could be something else there…

Yes, I am in Suite version 8.1

It is a module based on person, it doesn’t have any direct link to Invoices

Ok, if it’s v8, then LineItems are not necessarily an invoices issue.

But I’m afraid I don’t have much to suggest to you, apart from opening an issue with a thorough description of the problem on GitHub:

Fair enough, I will do that.

Thank you.

1 Like