Solved

How to make value of non-persisted field available on web service endpoint

  • 7 December 2022
  • 7 replies
  • 125 views

Userlevel 2
Badge

I have a method, FooBar() that returns a value that I want to be made available on my web service endpoint. I display the value on a non-persisted field by setting it in the RowSelecting event, but it does not make it to the endpoint?

 

How can I get the value of my non-persisted field to the endpoint?

icon

Best answer by davidrichards12 9 December 2022, 17:50

View original

7 replies

Badge +18

@davidrichards12 , I think the proper spelling is FUBAR. 🤣

Thanks for making me laugh today, I needed that!  (Sorry, I can’t answer your question.)

Userlevel 7
Badge +5

And just confirming that the field is available when you’re configuring the endpoint?  It’s just that the value returned in the JSon payload is blank/empty?

Userlevel 2
Badge

@ddunn , yes, that’s correct. The field is in the payload, but it is empty.

Userlevel 7
Badge +5

@davidrichards12 try filling it in FieldSelecting. Does it make a difference?

Userlevel 2
Badge

@Dmitrii Naumov , I tried FieldSelecting and it does not make a difference. Thanks.

Userlevel 7
Badge +5

@davidrichards12 Ok, I see. How do you fill the value?

Do you rely on other fields from the record when filling this virtual field?

 

Userlevel 2
Badge

So I ended up taking a different tack on this one. Thankfully, what I needed to populate this non-persisting field was able to be boiled down to a BQL statement. As such, I was able to us PXFormula on the field itself to populate it. This made the value available for both the screen and the API endpoint.

 

Thanks for all your responses and willingness to help.

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