My Products
Help
KonsultVn
CHAMPION ***

Error creating suppliers with restrictions on account

by KonsultVn

Hi, 

 

We have an issue when trying to create a supplier with restrictions active on account level.

 

If we have an expense account with restrictions we get the following message: 

 

{
	"message": "Error inserting the supplier. Error: Kostnadsställe of VExpenseSubID do not exist."
}

 

 

And here's the body: 

POST /controller/api/v1/supplier

 

{
	"name": {
		"value": "Test"
	},
	"supplierClassId": {
		"value": "40"
	},
	"overrideWithClassValues": true,
	"mainContact": {
		"value": {
			"name": {
				"value": "Test"
			}
		}
	},
	"mainAddress": {
		"value": {
			"addressLine1": {
				"value": "Testgatan 1"
			},
			"postalCode": {
				"value": "11111"
			},
			"city": {
				"value": "Testort1"
			}
		}
	},
	"glAccounts": {
		"value": {
			"expenseSubaccount": {
				"value": "46-000-000000-0-00000"
			}
		}
	}
}

 

We have tried with "overrideWithClassValues" set and vice versa. 

 

We also have an issue when restrictions on the supplier account. Since the supplier ledger sub isn't available via the API we always get an error. 

 

Here's the call:

 

POST /controller/api/v1/supplier

 

{
	"name": {
		"value": "Test"
	},
	"supplierClassId": {
		"value": "40"
	},
	"overrideWithClassValues": true,
	"mainContact": {
		"value": {
			"name": {
				"value": "Test"
			}
		}
	},
	"mainAddress": {
		"value": {
			"addressLine1": {
				"value": "Testgatan 1"
			},
			"postalCode": {
				"value": "11111"
			},
			"city": {
				"value": "Testort1"
			}
		}
	}
}

 

 

ipp-company-id: 4933212

 

Thanks

1 REPLY 1
Yıldırım
VISMA

by Yıldırım

Hello, I think this is having the same root cause as https://community.visma.com/t5/Forum-in-Developers-Visma-net/Error-creating-customer-with-restrictio... 

 

We've conveyed this problem to development team as well. We'll keep you informed.