to get a personalized navigation.
to get a personalized navigation.
Hello,
While implementing a synchronization job between an on-premise CRM and Visma.Net ERP via the API, I keep getting the following error:
VismaId: e6200028-397c-4500-bc74-579ae3cf0c9a. Error creating customer payment method. Error: Inserting 'Customer payment method' record raised at least one error. Please review the errors. Error: Cash account '6842' cannot found in the system. Check whether you have access rights to this object.
This is what I'm trying to do:
{
"active":{
"value":"true"
},
"cashAccountId":{
"value":"BOW588"
},
"customerId":{
"value":"922076"
},
"paymentMethodId":{
"value":"2"
},
"paymentMethodDetails":[
{
"value":{
"value":"NL91 ABNA 0247 7787 29"
},
"detailId":{
"value":"01"
}
}
]
}
Now, the thing is, the cash account we need to set turns out to be configured in Visma to be branch-specific, so it belongs to one branch only.
I can reproduce the error above in the UI when I don't select this branch in the dropdown in the upper right corner.
However, the DTO as described in Swagger for CustomerPaymentMethod doesn't contain a branch / branchId / branchNumber that I can specify.
What am I missing?
Do I need another API call to set the branch for the inserted customer in order for the POST to CustomerPaymentMethod to succeed?
Or is it possible to specify the branch via a HTTP headers, like we do for company with ipp-company-id?
Thanks for helping me out on this one.
Cheers,
Eddy
Windex
Solved! Go to Solution.
Hello,
in the first place
Cash account '6842' cannot found in the system. Check whether you have access rights to this object.
"6842" is an AccountID what is assigned to every specific Account that can be found in the Financials
UI:Chart of Accounts > ScreenID=GL202500
When it comes to Creating a Customer Payment Method with specific PaymentMethod and Cash Account,
Cash Account/s that you'd like to use with "CustomerPaymentMethod" should be defined under the Payment methods:"Allowed Cash Accounts" in Financials ERP ScreenId=CA204000 regardless of what branch is in use.
then this cash account can be selected while creating a customerPaymentMethod.
Example JSON
POST:https://integration.visma.net/API/controller/api/v1/customerpaymentmethod
{
"customerId": {
"value": "10015"
},
"paymentMethodId": {
"value": "01"
},
"active": {
"value": true
},
"cashAccountId": {
"value": "1930"
},
"paymentMethodDetails": [
{
"detailId": {
"value": "01"
},
"value": {
"value": "123456789"
}
}
]
}
Regarding,
@Anonymous wrote:Now, the thing is, the cash account we need to set turns out to be configured in Visma to be branch-specific, so it belongs to one branch only.
I can reproduce the error above in the UI when I don't select this branch in the dropdown in the upper right corner.
Please make sure that "Multi-branch" and "Inter-branch transactions" are active in your licence and enabled in the Financials ERP company.
ScreenID:CS100000
Afterward, go to desired "Cash Account" screenID:CA2020PL and set "restrict visibility with branch : false"
Hi Yildirim,
>> Afterward, go to desired "Cash Account" screenID:CA2020PL and set "restrict visibility with branch : false"
The cash account visiblity is indeed restricted to the branch.
(I can't modify this setting myself but I can confirm this)
Question: Does "restrict visibility with branch" have to be unchecked in order to be able to POST a CustomerPaymentMethod with a that particular cash account via the API?
Or is there another way around this? If not, I will pass this on to the consultant that manages these settings to uncheck this.
Thanks!
Eddy
Hi,
When it comes to the account that is mentioned in the error message you receive, could you please have a look at the forum post from the old forum where we talked to your colleague about this error?
Error creating customer payment method
Please send us a screenshot of where you get this issue in the UI together with the screenID and we'll have a look.
This is an image from the window that the endpoint "customerPaymentMethod" affects:
Thanks Magnus.
It turns out the cashAccount is present, but it's under a specific branch.
We didn't know that at the time we wrote the last post, only found out about this today.
I'm sure it is going to work if "restrict visibility with branch" is deselected.
At the time we have been testing we have worked with another ipp-company-id which was set-up for testing purposes.
It turns out the restriction wasn't enabled there, and we didn't experience the issue.
The business consultants who manage these settings told us they'd rather keep it restricted because that was what the customer wanted.
If what I ask isn't possible without unchecking it, I will ask them to uncheck it in order for it to work.
Thanks!
Eddy
Hello Eddy,
@Anonymous wrote:
Question: Does "restrict visibility with branch" have to be unchecked in order to be able to POST a CustomerPaymentMethod with a that particular cash account via the API?
Or is there another way around this? If not, I will pass this on to the consultant that manages these settings to uncheck this.
If that particular cash account is restricted to a branch that is different from the main then "restrict visibility with branch" should be set false to be able to POST a CustomerPaymentMethod with that cash account via API.
Copyright © 2022 Visma.com. All rights reserved.