By using this website, you agree to our Terms of Use (click here)
Hello, Please help me out and vote for this idea:
So, I had a neat customization concept, where one of our sales reps could select a few lines on an Opportunity (Ctrl+Click, Shift+Click the row headers), run an Action, enter a percent, then automatically discount those selected lines by the % they want. I knew Acumatica can interact with these lines given the multi-line Cut/Paste commands and I thought it would be fairly straight forward to hook into to.
After some initial poking around turned up nothing, I ended posting in Stack Overflow to see if anyone else bumped into this.
I spent several days investigating while waiting for a response. It boils down to some javascript and magic code they have in PXGrid. In the Javascript, the PXGrid has a property "selectedRows" which provides what we want. The issue is, javascript is kept client-side in the browser, and, for performance reasons, selectedRows isn't shared back to the server unless absolutely necessary. I just can't figure out the trick to setting up the javascript that I need, and then calling it from a Button on the screen. And even if I did, I had nowhere to put the selected lines aside from taking over their RowsToMove property and the protected method GetMoved(), which lives in the C# and would break the Cut/Paste functionality and cause who knows what other side effects.
Maybe I'm missing something straight forward? I dug way deeper into Acumatica's guts than I usually do, and it's easy to miss something surface level that could have saved me. If I had my wish, there would be a SelectedRows property on the PXGrid in C#, a GetSelected() method on the PXOrderedSelectBase in C#, javascript that could load those server side, and some "Load Selected Rows" property on a Button where you can enter the key for your Grid in the Customizer which can call the javascript to send selectedRows to the server before running the normal button code.
I'd like to share more details about this, but much of it came from looking at code they don't normally share in their CodeRepository folder, and I don't want to just throw that around willy-nilly. If you got this far, thanks for reading, and please vote for my idea if you didn't already!
It looks like Acumatica changed the numbering of their topics, the new link is:
Thank you!