Solved

Adding User-Defined Fields/Attributes to a Web Service Endpoint

  • 20 February 2024
  • 3 replies
  • 129 views

Userlevel 1

Can attributes/user-defined fields be added to a web service endpoint? I would expect to see them under “Order Summary,” but I’m not having any luck. I’m able to find usr fields (custom fields), but not attributes.

 

Thanks!

 

 

icon

Best answer by stephenbologna39 21 February 2024, 01:30

View original

3 replies

Badge +11

If you expand an entity, I believe you’ll find there is an Attributes node already populated. How exactly you use it, I’m not sure, but I did find a help article about it, below.

 

Also, if you attempt to add a field, you can also find ‘Attributes’ in the ‘Mapped Object’ field. Using it will definitely not be as straight-forward as a custom field.

You can find more information here.

Userlevel 1

Thanks Daryl,

This for the sales order screen where there is no attributes tab, so it’s a bit different. It’s a user-defined field, which is an attribute on a transaction document - there is no attribute mapping. When importing data into these fields through an import scenario, they appear in the header section under order summary.

This is where they should be located, but they are nowhere to be found. 

 

 

Userlevel 4
Badge

Hi @bwhite49 

This can be done, but it requires a few extra steps.  You most likely will not need to add these fields to the Endpoint to interact with them.

First, to find the mapped names for your fields, call the following URL to see the complete list/structure of fields available for the Sale Orders screen:

[sitename]/entity/Default/23.200.001/SalesOrder/$adHocSchema

You should find your UDFs listed under the ‘custom.Document’ section.  They should all have names that start with ‘Attribute’.

To request these fields with a GET request, use the following URL.  Custom fields need to be listed in the $custom parameter of your URL:

[sitename]/entity/Default/23.200.001/SalesOrder?$custom=Document.AttributeField1,Document.AttributeField2

To set these values with a PUT request, send the data in the following format:

{
"OrderType": { "value": "SO" },
"CustomerID": { "value": "AACUSTOMER" },
"Description": { "value": "Sales Order Created Through API" },

"custom": {
"Document": {
"AttributeCOLOR": { "value": "Blue" }
}
}
}

 

Source:

https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=01266cc0-6eb1-4e41-b049-246e5915496d

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved