Skip to main content
Solved

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

  • February 20, 2024
  • 3 replies
  • 494 views

bwhite49
Pro I
Forum|alt.badge.img+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!

 

 

Best answer by stephenbologna39

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

View original
Did this topic help you find an answer to your question?

3 replies

darylbowman
Captain II
Forum|alt.badge.img+13

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.


bwhite49
Pro I
Forum|alt.badge.img+1
  • Author
  • Pro I
  • 91 replies
  • February 20, 2024

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. 

 

 


Forum|alt.badge.img+1

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings