Solved

PXSelect isn't retrieving data

  • 26 May 2023
  • 7 replies
  • 179 views

Userlevel 3
Badge +1

i have created a dac from a table

but when i select from it using pxselect it dosent get any data but in the screen it shows the data normally

the searchinspection in the below picture is giving me the default data everytime i debugged it the inspection number is sent normally to the select but it dosent return any data from database.

 

icon

Best answer by abdallaahmed61 26 May 2023, 15:46

View original

7 replies

Userlevel 3
Badge +1

this is my DAC Code

Userlevel 3
Badge +1

i solved it by clearing the cache

Userlevel 7
Badge

Thank you for sharing your solution with the community @abdallaahmed61 !

Badge +10

@abdallaahmed61 - I have to admit, I’m really confused by this code. What is the purpose of performing a BQL select against the same table to get the same record result?

inspectionForm.Current is going to contain the record currently displayed in your graph. But rather than use that record, the data view delegate for that view is going to duplicate itself into a new view where the current record is matching itself, and then return that record instead of the normal one.

You don’t need to use a data view delegate. That is simply a useful tool if you need to manipulate the data you want to return. In this case, I think you’d be better off without it.

Userlevel 3
Badge +1

@abdallaahmed61 - I have to admit, I’m really confused by this code. What is the purpose of performing a BQL select against the same table to get the same record result?

inspectionForm.Current is going to contain the record currently displayed in your graph. But rather than use that record, the data view delegate for that view is going to duplicate itself into a new view where the current record is matching itself, and then return that record instead of the normal one.

You don’t need to use a data view delegate. That is simply a useful tool if you need to manipulate the data you want to return. In this case, I think you’d be better off without it.

my code was getting me crazy by not working right 

thats why i played a bit with my code 

i know its not good way i was just trying to figure out why the code isnt working as i want

 

Badge +10

Understood, and for sure it takes a bit to understand how everything works. I'm simply suggesting that it may create issues farther down the road the way you are doing it, as you've already experienced. I think your best bet would be to remove the data view delegate and also possibly the searchInspection data view.

Userlevel 3
Badge +1

Understood, and for sure it takes a bit to understand how everything works. I'm simply suggesting that it may create issues farther down the road the way you are doing it, as you've already experienced. I think your best bet would be to remove the data view delegate and also possibly the searchInspection data view.

Yup i did that after i solved the main problem.

The main problem was i was using the same view in my tabs that was making the screen go crazy and make terrible things 😂

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