we create our users and persons via an extra php script and that worked fine so far.
But now the person can no longer be found, only the user is accessible.
I have checked our script and everything works as before.
When troubleshooting I found the error from the title when trying to search for the person.
Possibly there is a problem with location_id but it is correct and I could not find anything regarding the class Team in DB or through the interface.
Hope someone can help.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's direct database manipulation, which is not recommended.
In fact, the order is wrong. "Person" is a subclass of "contact". So "Contact" should be created before person. Both a person and a team are contacts. The table of contacts might therefore have IDs which are only present in the "person" or "team" tables.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it has worked very well so far and I'm afraid it can't be changed so fast.
But I will have a look at the official REST API.
Is there any documentation for it?
As for the error, do you think it comes from the wrong order?
Is there anything I can do to fix this so that the error "Unknown attribute location_id from class Team" no longer occurs?
So persons and teams are both contracts, but in the DB it says person with the user and not team.
Anyway, it was a good hint I now realised that the ID was not the same because of a previously created team, which is why the reference to a team in the error.
I would still appreciate information about the official API so that I can switch to it.
Thank you very much!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You'll still need to make sure the order of execution is correct. But if you create a "person" with the API, it will automatically create the record in the "contact" table as well.
Last edit: Jeffrey Bostoen 2023-06-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey folks,
we create our users and persons via an extra php script and that worked fine so far.
But now the person can no longer be found, only the user is accessible.
I have checked our script and everything works as before.
When troubleshooting I found the error from the title when trying to search for the person.
Possibly there is a problem with location_id but it is correct and I could not find anything regarding the class Team in DB or through the interface.
Hope someone can help.
Thanks!
So it creates a user, but no person?
Since you're using it through a PHP script: are you using the API? Might be good to show the output you get after making the API call.
Hello Jeffrey,
and thanks for the fast reply.
The script creates both, but only the user could be found in web interface. (without Given Name and Surname)
Here is an extract from our script:
The script was created by a former employee, it is our own API, in a way.
I didn't know that an account creation is also possible via an API. If it can be integrated into our PowerShell, I might change over.
Thank you!
Last edit: Chris H. 2023-06-16
It's direct database manipulation, which is not recommended.
In fact, the order is wrong. "Person" is a subclass of "contact". So "Contact" should be created before person. Both a person and a team are contacts. The table of contacts might therefore have IDs which are only present in the "person" or "team" tables.
Hello Jeffrey,
it has worked very well so far and I'm afraid it can't be changed so fast.
But I will have a look at the official REST API.
Is there any documentation for it?
As for the error, do you think it comes from the wrong order?
Is there anything I can do to fix this so that the error "Unknown attribute location_id from class Team" no longer occurs?
So persons and teams are both contracts, but in the DB it says person with the user and not team.
Thank you very much!
Anyway, it was a good hint I now realised that the ID was not the same because of a previously created team, which is why the reference to a team in the error.
I would still appreciate information about the official API so that I can switch to it.
Thank you very much!
It may be a result of the wrong order.
https://www.itophub.io/wiki/page?id=latest:advancedtopics:rest_json
You'll still need to make sure the order of execution is correct. But if you create a "person" with the API, it will automatically create the record in the "contact" table as well.
Last edit: Jeffrey Bostoen 2023-06-17