How to update an Entity created by Bootstrap action

Hi,

I have tried to update an entity called Category, wich has been created by importing from excel, with the following steps:

- I have 2 modules, one blank.for data model, and another for UI.

- At data module, at resouces I saved  the file Categories.xlsx locally on my computer;

- I have chaged locally the content of the file with new data;

- At resources selected Change Resource...

- Publish the data module

- At the other module (UI) I have publish it again.


The Categories that are in a Combobox remain as initially without any changes...

Can you please help me to solve.

Thank you,


Luis


Solution

Hi LHHB,

Check your bootstrap logic.

It will check if the Category entity has records.

In case it has records it will exit without loading the data from the excel resource.

To overcome this you can do this, i suggest:

When you do not have foreign key references to your categories yet from other entities:

  1. Add site property DeleteCategoryPriorBootstrap type boolean, set default to true.
  2. Change the logic to first check this site property. If true use an SQL widget to delete all categories:
    DELETE FROM {Categories}
  3. Publish you module, the categories will be deleted prior to bootstrapping them again.
  4. Go to Service Center --> Modules --> Your Module --> Site properties --> set the site property to false, to avoid that on next publish the records will be bootstrapped again.

When you already have foreign key references in other entities:

  1. Scaffold a list and detail screen 
  2. Publish
  3. Run screen and change data manually.

Regards,

Daniel


Solution

Hi Daniel,

thank you for your answer. I follow the second suggest from you because I have foreign keys in other entities.

Thank you,


Luis Barqueira