My Products
Help

What "Please review the company tree." error indicates while creating a Timecard via API ?

31-08-2020 15:43 (Updated 31-08-2020)
  • 0 Replies
  • 0 kudos
  • 1248 Views

In this article we'll review an error message that can be returned when invoking POST > Timecard operation via Timecard Endpoint as well as how to resolve this issue.

Timecard endpoint is corresponding with "Employee time card" module in the Visma.Net ERP. (Document View "ScreenID=EP305000"  / Module View ScreenID=EP406000 )

tc.png

 

Employee field indicates the employee's reference ID that who we want to create a time card for. The correspondent field in the API POST/PUT DTO is 

"employee": {
    "value": "string"
  },

 

Based on your Financials ERP Company setup , The ID of the currently signed-in employee is selected by default on the identifier of the employee whose time cards you want to manage.

If your Visma.net User which is used while generating an API Token isn't member of a group that is not hierarchically higher order in the company tree than the desired Employee ID  you want to create a time card, TimeCard POST operation returns the following error:

"message": "You cannot create timecards for the selected user. Please review the company tree."

The same scenario is valid for ERP UI as one cannot select different employee unless above-mentioned settings are configured.

Since this is related to your Financials ERP Company configuration, you need to adjust organization/company tree setup. In order to be able to configure this, please follow the instructions below.


1) Workgroup assignment for the Employee

  • Go to Company Tree (ScreenId=EP204060) 
  • Click your Company Name on top left
  • Add a group by clicking (+) under List of Groups
  • Add a Group Member 
  • Update Tree
  • Save

 embeddedimage1598538477939.png

 

 

 

 

 

 

 

 

2) Continuing with,

  • Create a new group under the recently created one. 
  • Click Test Group on the hierarchy tree (left) 
  • Add a group by clicking (+) under List of Groups
  • Add a Group Member (That is different from your current Login, this employee must be registered in the company)
  • Update Tree
  • Save

2.png

 

 

 

 

 

 

 

 


3) Then select newly created group e.g (A Group) and click (=>) right arrow, this will give transaction access to your current user on the users these grouped below in the hierarchy.

t2.png

 

 

 

 

 

 

 

 

 

 




4) Now this employee can be selected / used with both UI Employee Time Card and API.

3.png

Contributors