My Products
Help

Suspension date

by David Tandberg-Johansen (Updated ‎12-09-2023 09:35 by David Tandberg-Johansen )

Hi,

 

Im trying to follow the thread https://community.visma.com/t5/Diskusjon/Do-a-Query-on-CompanyInformation-Processings/m-p/524187#M82 and get the suspension date, but the suggested GraphQL query returns a array

 

The Query

 

query ($cid :Int!) {
  useCompany(no: $cid) {
    companyMaster(filter:{primaryKey : {_eq : 12}}) {
      items {
        value      
      }
    }
  }
}

 

 

The response

 

{
  "errors": [
    {
      "message": "Cannot query field 'companyMaster' on type 'Query_UseCompany'. Did you mean 'companyError' or 'companyVatRegister'?",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ],
      "extensions": {
        "code": "FIELDS_ON_CORRECT_TYPE",
        "codes": [
          "FIELDS_ON_CORRECT_TYPE"
        ],
        "number": "5.3.1"
      }
    }
  ]
}

 

I search for the companyMaster in GraphiQL, and it comes up as a table in the documentation part

 

Does anyone know how tu get the suspension date?

 

8 REPLIES 8

by David Tandberg-Johansen

Hi @omelhus 

 

Yes, we are using

select Mdt from Mst where pk = 12

by David Tandberg-Johansen

Hi Marius,

 

Thank you for replying.

 

If I understand you correctly, this table i read only?

How can I get the suspension date?

No, it's not read only. It's not available for reading at all.

Florian Haase
PARTNER

What is the status here? We also need the suspension date info and still can't get this information from the API. We wonder how to do it?

Hi Again, 

 

So there are no way get suspension date? 

omelhus
PARTNER

Do you have the equivalent query to get it on-premise?

by Marius Bancila

I see you are following up a post that I made some time ago. That probably didn't work in the first place. I recommended that because I knew the table in which it was stored but I wasn't aware the table is not exposed for reading. I am not aware of all the rights on all the tables and I probably recommended a query that never worked. In which case, I apologize for misleading.

by Marius Bancila

The GraphQL schema is dynamically created from the VB data model, based on access rights for CRUD operations on tables, columns, processings, etc. When things change in the data model they are automatically updated in the GraphQL schema.

 

I see that this table has the read access set to "none" so it's not exposed for reading.