My Products
Help
iizy
CONTRIBUTOR **

Update associate - Not allowed to change if transactions.

by iizy

We're trying to update the customer by using the mutation associate_update, but we're receiving the following error: Error: Not allowed to change if transactions. 

 

Do you know what exactly this error message means? We couldn't find anything in the documentation.

 

Request:

mutation UpdateAssociate($companyId: Int) {
  useCompany(no: $companyId) {
    associate_update(filters : [{customerNo : {_eq : 9000}}], values: [
            {
      addressLine1: "",
      postCode: "",
      postalArea: "",
      name: "Test Account",
      customerNo: 9000
    }
    ]) {
        affectedRows
        items {
            associateNo			
            name			
            shortName			
            customerNo
         }
      }
   }
}

 

2 REPLIES 2
iizy
CONTRIBUTOR **

by iizy

Hi @Øyvind Årseth It worked, thank you for your help 😉

Accepted solution
Øyvind Årseth
VISMA

by Øyvind Årseth

Hi @iizy You are not allowed to change the customerNo if it is already in use.
Just remove customerNo from "values", then you are good to go.