how to force table creation to avoid Invalid Object Name exception

23 views
Skip to first unread message

Shuki Birshan

unread,
Jun 18, 2025, 2:58:55 PMJun 18
to Migrated By Firefly
Hi,

I have a business process that runs across a lot of table in search of customer data.
I have some tables that it is possible that the user never entered the screen from which the data is inserted to the table.
resulting that the table doesn't exists.

in the bp, when  I try to locate the records via: 
From = MyTable
Where.add(MyTable.customerId.IsEqualTo(customerId_prm))

I am getting an excpetion:
Invalid object name on the table name (because it doesn't exists.

what can I do to avoid this exception ? 
maybe create the table if it doesn't exists.
tried AutoCreateTable but didn't work.
please note that I only query the table to get data and not to insert or update the data.
2025-06-18_21h47_43.png


Thanks
Shuki

Noam Honig

unread,
Jun 19, 2025, 5:19:25 AMJun 19
to Shuki Birshan, Migrated By Firefly
options:
1. Set AutoCreateTable to true on the entity (not recommended - since it'll always check if the table exist before accessing it)
2. Set AutoCreateTable to true for an entity in a specific controller (it'll only check in that controller)
3. If you're using an sql datasource you can do: if (!entity.exists()) Shared.DataSources.Northwind.CreateTable(entity)

Noam Honig  
Founder & CEO


--
You received this message because you are subscribed to the Google Groups "Migrated By Firefly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to migrated-by-fir...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/migrated-by-firefly/d7cd5ec1-fdbb-4ba5-bdb8-700652594585n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages