Skip to main content
Answer

view/change StockItem "User defined fields" (REST)

  • November 28, 2023
  • 6 replies
  • 159 views

Forum|alt.badge.img+2

Previously, I was using SOAP to modify my user defined fields in a StockItem using the StockItemSummary object.  After switching to REST, I can’t even see these fields when I view the results of a GET operation using the following URL:

https://url.com/entity/Default/22.200.001/StockItem?$filter=InventoryID eq 'XYZ-123456'&$expand=Attributes,ReplenishmentParameters

Is there a different object that I need to add to my $expand list?

Best answer by Vignesh Ponnusamy

Hi @jinin, One can enable UDF in the screen by editing ASPX of the page, adding EnableAttributes="True" in the PXDataSource section.

@bpgraves, If you have UDF enabled for the screen, you can something like $custom=Document.AttributeOPERATSYST in the request URL to fetch the field. For more details on it kindly refer, https://help.acumatica.com/(W(6))/Help?ScreenId=ShowWiki&pageid=a0444120-2e5d-41cd-8c65-0385210b0f8a

Good Luck,

6 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • November 28, 2023

Hi @bpgraves 

Please try like the below,

url:  entity/Default/20.200.001/StockItem/AACOMPUT01?$Expand=Attributes

 


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • November 28, 2023

Hi @bpgraves 

Please try like the below,

url:  entity/Default/20.200.001/StockItem/AACOMPUT01?$Expand=Attributes

 

These are attributes which I’ve already expanded the URL I mentioned.  I’m referring to “User Defined Fields”.  How do I expand these?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • November 28, 2023

Hi @bpgraves ,

The stock item enables the addition of attributes for setting user-defined fields through Item classes where the required attributes are defined. You won't find the option 'Manage user-defined field' on the Customization menu of the Stock item entity screen.

I'm unsure how you added a user-defined field on the stock item screen without the feasibility.


Refer to the below document:

https://help-2021r2.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=9ac91432-d70f-4f00-bc0a-f5569d76cdfd


Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @jinin, One can enable UDF in the screen by editing ASPX of the page, adding EnableAttributes="True" in the PXDataSource section.

@bpgraves, If you have UDF enabled for the screen, you can something like $custom=Document.AttributeOPERATSYST in the request URL to fetch the field. For more details on it kindly refer, https://help.acumatica.com/(W(6))/Help?ScreenId=ShowWiki&pageid=a0444120-2e5d-41cd-8c65-0385210b0f8a

Good Luck,


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • November 28, 2023

Hi @jinin, One can enable UDF in the screen by editing ASPX of the page, adding EnableAttributes="True" in the PXDataSource section.

@bpgraves, If you have UDF enabled for the screen, you can something like $custom=Document.AttributeOPERATSYST in the request URL to fetch the field. For more details on it kindly refer, https://help.acumatica.com/(W(6))/Help?ScreenId=ShowWiki&pageid=a0444120-2e5d-41cd-8c65-0385210b0f8a

Good Luck,

Thank you!  😀  That link gave me the key <View name> which is what I was missing when I tried using $custom earlier.  I’m able to get the user defined fields now!  😄


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • November 29, 2023

Hi @jinin, One can enable UDF in the screen by editing ASPX of the page, adding EnableAttributes="True" in the PXDataSource section.

@bpgraves, If you have UDF enabled for the screen, you can something like $custom=Document.AttributeOPERATSYST in the request URL to fetch the field. For more details on it kindly refer, https://help.acumatica.com/(W(6))/Help?ScreenId=ShowWiki&pageid=a0444120-2e5d-41cd-8c65-0385210b0f8a

Good Luck,

Thank you @Vignesh Ponnusamy for the information. It's helpful.