We want to extend a Business Account to a Vendor using an Acumatica Webservice endpoint. In the past we were successful in making a POST request to extend Business Account to a Customer using ‘ConvertBusinessAccountToCustomer’. We were hoping if there is something like that event for extending to Vendor as well.
Any leads on how to accomplish this would be greatly appreciated.
Best Regards, Amruta
Page 1 / 1
I was able to add “ExtendToVendor@Action” to ‘businessaccount’ module of the endpoint. But there are couple of required fields on the Vendor screen which needs to be filled out in order to complete extension to Vendor. Since the ‘Action’ is added to ‘businessaccount’ module, I’m unable to add the required fields of Vendor screen to the parameters.
Any thoughts on how to accomplish the “ConvertBusinessAccountToVendor” given the circumstances? All the help is greatly appreciated.
Best Regards, Amruta
I’m working on using the ConvertBusinessAccountToCustomer api. Once I’ve figured that out then I might be able to help with the vendor. For the conversion to a customer what parameters did you use or did you pass in the business account id in the body?
Hi @vpoulson
I’ve tried to use the Extend to vendor and Extend to Customer. Both giving same error “ The Extend to Customer button is disabled /The Extend to Vendor button is disabled ”
I’ve used the BusinessAccountId as a parameter. And also set the Default Vendor Class/ Default Customer class in the preference screen. So able to save the records in screen without any other details. Assume same should work with API as well.
I tried like below.
Let me know if you find a way to achieve this.
here is the body I used for the ConvertBusinessAccountToCustomer:
{
"entity":{
"Type":{"value":"BAccount"},
"BusinessAccountID":{"value":"BA00000029"}
}
}
If had already set the Business Account to a Customer and then deleted the customer I would still get the button disabled error. Hope this help.
Thanks @vpoulson . Worked now
@Amruta@vpoulson I’ve tried below steps to extend the Vendor details.
1. Extend the default endpoint
Select the Business Account Entity
Select the action under Business Account Entity
Next click the Insert button and insert the Extend to Vendor Action
For some reason I don’t have the ExtendToVendor@Action for the mapped actions option in my system.
I’m on 21R2.212.v.1.0.14 and I’m not sure what could be different. I’ve tried the ExtendToVendor@RecordCreation and just the ExtendToVendor mapping but neither of those work.
Any ideas on why I don’t have that action?
In looking more closely at the options it seems that I would need to use the @RecordCreation option.
When I try that in Postman I get a 422 Unprocessable Entity error. When I run the Extend as Vendor in the tenant I need to set the Vendor Class before I can save the new vendor. I’m not sure how to set the vendor class in the api call. Any ideas on how to do that?
Hi @vpoulson
I will review and update my findings.
Hi @vpoulson
Before I tested 20R2 instance and now checked the same on the 21R2 instance.
yes, the entity name changed on the 21R2 instance from ExtendToVendorAction to ExtendToVendor.
And also the request needs to change like below.
{
"entity": {
"BusinessAccountID": { "value": "BACCOUNT02" },
"Name": { "value": "BusinessAccount02" },
"VendorID": { "value": "BACCOUNT02" },
"VendorClass": { "value": "INTERCO"
}
}
}
But Vendor class is not accepting from Request. So I’ve configured on the Account preference screen.
@jinin thanks so much. I’ll give that a try and see how it goes.