Solved

New row button on grid not working

  • 5 January 2021
  • 3 replies
  • 670 views

Userlevel 6
Badge +3

I have a simple table and a grid to add records to it.  The Account Mapping grid works.  But on the Branch Mapping grid, when I click the “PLUS” icon, the icon goes grey and no new row is available on the grid.

Before clicking PLUS

 

This is what is looks like after clicking the PLUS icon:

 

The table is very simple.  

 

When a Company is selected, the view for the grid is

 

        public SelectFrom<ICSBranchMapping>
            .Where<ICSBranchMapping.organizationID
                .IsEqual<ICSSetup.organizationID.FromCurrent>>.View BranchMapping;
 

The ICSSetup table is even simpler:

 

 

If I create a new record in ICSSetup, it lets me add 1 row to the ICSBranchMapping table

 

But I cannot add another row.

Here is the DAC for the ICSBranchMapping table

 

The records in the DB all look fine after adding the 1 row it will allow me to enter.

The action button is a dummy.  The code has been commented out to ensure it has nothing to do with the issue.

I forgot to mention, I CAN update the existing row.

I’ve been fighting with this for 2 days.  If anyone has any suggestions, please help.  

icon

Best answer by Naveen Boga 6 January 2021, 06:34

View original

3 replies

Userlevel 7
Badge +17

Hi @joe21 

For me, the provided DACs and table structure looks good except for the below PXParent Attribute from ICSBranchMapping DAC.

  [PXParent(typeof(Select<ParentDAC, Where<ParentDAC.processID, Equal<Current<ChildDAC.processID>>>>))]

Current is missed from the above PXParent syntax. Please add and verify.

 

Hope this helps!!

 

Userlevel 6
Badge +3

Thank you Naveen for your assistance.  Unfortunately that didn’t change anything.  I have another tab on that form that maps GL accounts and it works flawlessly.  I didn’t have the Current on either Parent attribute and it didn’t change anything when I added it.  I noticed some other strange behaviors.

REALLY STRANGE but I found something very telling.  If I click the add new row icon, either the new row doesn’t show up at all or it shows a new row that disappears after I move my mouse over it.

Even though I cannot see the row, I type “12345”, hit tab on the keyboard, the plus sign becomes available again (but I don’t click it).  I type 12345 in the second field even though I cannot see it.  I repeat the process and click save on the record.  IT ADDS BOTH RECORDS TO THE TABLE!!!  Even though neither of them are visible!

Sometimes depending on some sequence of refresh page, select company etc...I can’t reproduce it, it will show the records in the grid.  When I click add row, it lets me add a new record.  When I click add row, it puts the cursor in the first field and all but the bottom most existing record disappear.

 

Userlevel 6
Badge +3

Solved.  I added the BranchMapping grid using the customization editor.

It did not include this line in the aspx:

<Mode InitNewRow="True" ></Mode>

That fixed it.  It seems like that should be a default in the Screen Editor.

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