Referencing UD Field in a REST GET or POST Request

How does one reference a UD field in a REST Request. UD tables are seen as part of the table in a BAQ, but must be accessed via a join to the base table if doing a query in SSMS (SQL Mgmt Studio) and it appears to be the same in REST. What does it look like to include UD fields in either GET or POST?

I stand corrected: UD fields are being returned in a GET request. The syntax in my POST request must be incorrect. I’ll investigate further.

In SSMS, the base table uses Erp.(tablename) but you can reference dbo.(tablename) instead to get the UD fields without needing to reference the (tablename)_UD table explicitly. Don’t know if that applies here, but just in case :slight_smile:

I had forgotten about the views (dbo) in SQL. Unfortunately I don’t think REST utilizes SQL views. But thank you for the reminder. I’ll see if that suggests another way to POST to UD fields.

I’m a little confused, are you saying you do not see your custom UD field in the schema via REST?
In the swagger page, you should see your fields there and if not you might need to regen your data model.


They will just be the field name as it appears in your table.

Yes … I’m not seeing them … and I already did a regen of the data model. Turns out that was because the added field isn’t appearing at the end of the list in the swagger:
image

So … I guess it was there all along. Is there a way to put all the new fields at the end of the listing?

I create all our UD fields as UD_(fieldname)_c (Epicor appends the _c) just so that we can find them easily. But that won’t help with existing fields.