Skip to main content
Solved

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

  • December 7, 2022
  • 7 replies
  • 174 views

davidrichards12
Freshman II
Forum|alt.badge.img

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?

Best answer by davidrichards12

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.

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

Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • December 7, 2022

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

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


Forum|alt.badge.img+6
  • Captain II
  • December 7, 2022

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?


davidrichards12
Freshman II
Forum|alt.badge.img

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


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7

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


davidrichards12
Freshman II
Forum|alt.badge.img

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


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7

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

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

 


davidrichards12
Freshman II
Forum|alt.badge.img

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


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