Community
Showing results for 
Search instead for 
Do you mean 
Reply

Unable to create or delete a CustomEntity

Accepted Solution Solved
Copper Contributor
Posts: 23
Country: United Kingdom
Accepted Solution

Unable to create or delete a CustomEntity

I'm trying to create a new Company CustomEntity. This is a CustomEntity which has existed in the database previously but has (apparently) been deleted. 

 

By running the following code and examining the collection, I can see that the CustomEntity does not exist.

Dim Descriptors() As CustomEntityDescriptor
Descriptors = Instance.CustomEntities.GetCustomSubEntities(RecordType)
However, when I tried to create it as here: -
 
Dim Descriptor As CustomEntityDescriptor
Descriptor = Instance.CustomEntities.CreateCustomSubEntity(Name, Description, ParentEntity, False)
I get this error: -
 
Act.Data.ActDb.ActDbException:
'Invalid column name 'SL_ACCOUNT_REF'.
Invalid column name 'SL_ADDRESS_1'.
Invalid column name 'SL_CUST_ORDER_NUMBER'.
Invalid column name 'SL_DESPATCH_DATE'.
Invalid column name 'SL_GLOBAL_DEPT_NUMBER'.
...
 

It seems to be picking up fields which belong to a previous instance of the table.

 

This will work against a new database where the CustomEntity has never existed.

 

Anyone have any thoughts?

 

Thanks.

Luke

 


Accepted Solutions
Solution
Accepted by topic author lukedev
3 weeks ago
Bronze Super Contributor
Posts: 1,264
Country: USA

Re: Unable to create or delete a CustomEntity


All Replies
Solution
Accepted by topic author lukedev
3 weeks ago
Bronze Super Contributor
Posts: 1,264
Country: USA

Re: Unable to create or delete a CustomEntity

Copper Contributor
Posts: 23
Country: United Kingdom

Re: Unable to create or delete a CustomEntity

Thanks Jim.

 

That has resolved the issue with the database I was having problems with.

 

Luke