-2

I have a transaction with sub-levels

In the Transaction Web Form, I have the grid for it, but without conditions, and as I have a lot of records in this sub-level transaction and it loads all of them, there is a performance problem and a timeout error.

If I remove the grid, I have this compilation error: error: spc0104: Grids are mandatory for all levels but the first one..

As an example, I have this Transaction (and the table filled)

State
* StateId
StateName
StateCities
  * StateCityId
  StateCityName

There is a way to solve this o I have to delete the sub-level and make all the logic by myself?

Thanks a lot, Ariel

2 Answers2

0

Ariel,

You might created another transaction (with only one level) with the compound keys, like this:

*StateId *StateCityId StateName StateCityName

And insert, update or delete one by one

But I, personally, prefer not to use this approach but yes to create one webpanel (crud style)...

0

When you have a two-level Transaction in GeneXus, you are saying that the data in that transaction must be managed as a whole. That's why GeneXus won't let you remove the second level's grid from the Form.

What you need to do, if you want to manage the two levels separately, is to have two different transactions, one for each level.

In your case, the structure of the transactions would be:

-- State
* StateId
StateName

-- StateCities
* StateId
* StateCityId
StateCityName

And then, by applying the WorkWith pattern to both transactions, you'll be able to work with them separately.

Marcos Crispino
  • 8,018
  • 5
  • 41
  • 59