1.1 Create an Entity from an Excel File

I tried importing contacts from my own excel file, but on runtime, after the bootstrap was executed I don't see any contacts in the screen in my personal environment. I used the debugger to trace the code and I see it's executed correcly 'when published'. What did I do wrong here?
Thanks in advance for your answer.
Hi Martin,

There's a couple of things that might have happened. Can you possibiy share your module so that we can have a look at it? You can export it using Ctrl+S and attach it here in another post.

Hi André,
Included the model. I hope you can determine what's wrong here.
Thanks in advance!
Hi Martin,

I took a look but didn't see anything strange.
Let me try to guide on what's happening behind the scenes so that you can overcome this issue.

When you select the excel file a mapping is done between the excel columns and the entity attributes. This mapping is done by name and a dialog shows this mapping. This is usually the first step that can go wrong, you have different names and the mapping leaves some information out. Apparently this is not your case.

This excel is stored as a resource in your module and some logic is created to read the excel rows and to put that information in the database. This logic consists of a Timer that executes an action when you publish the module.
The logic in the action itself is relatively simple:
  • Check if there's already data for that entity in the database, using an aggregate;
  • If not transform the excel content in a list of records (using an ExcelToRecordList) with data type set to a structure that was created with the columns that were mapped from the excel file;
  • Cycle throught the list and create records in the database.
Now if you already have data in the database the action stops right at the beggining to prevent from having duplicates every time you publish your module.

So, my suggestion is that you place some breakpoints in the bootstrap action. And use the debugger to go over this logic step by step and determine why your data is not being stored in the database.

Sorry for the long answer, I hope it helps.