[BulkInsert] BulkInsert - TenantId not stored

Forge Component
(17)
Published on 2 Oct (14 days ago) by José Galter
17 votes
Published on 2 Oct (14 days ago) by José Galter

Hi,

I noticed that when I try to use BulkInsert on an entity with its Tenant Identifier (Tenant_Id) shown, this field is not filled and remains 0. Is this a known issue?

Regards,
Lennart

Hello Lennart, could you please see if there some message error in Outsystems General LOG?

If you put your table with show tenant identifier i think it should result.

As well you can try create a struct with all columns that you would like to bulk insert, all columns need to have the same name as your entity.


Best Regards,
Paulo Fagundes Jr.

Hi Paulo,

There are no messages in the General or Error log. I did a test with an entity with the fields Tenant_Id, Id, Label.

I have a loop adding records to a list of this entity, manually filling Tenant_Id and Label. This list is then fed to the BulkInsert action. This action does create the records in the entity. Field Label is filled, but field Tenant_Id is 0.

I've also tried it with ColumnsToIgnore filled with "Id" and ReferenceColumns set to "Tenant_Id", but that didn't make a difference.

Regards,
Lennart

Hi Lennart, sorry for my late reply.

Try use a struct instead of your entity. Create a struct with Tenant_Id and MyText columns.

Using it like this way you don't need put anything in ignore columns. Make sure that your columns name will have the same name as entity has, Put a breakpoint before your BulkInsert action and verify in debug if the whole data is filled in your variable,