I've read a number of threads that discuss either my ultimate objective, or errors I've seen along the way;
- Creating a worker attachment entity
- Custom entity attachments
- Using initValue to populate data entity fields
But the behaviour I'm seeing is subtly different, so I'm hoping someone can please help.
I've created a data entity using entity DocuRefEntity and table HcmWorker as data sources, setting the latter Is Read Only property to Yes. When I first attempted to use this entity, my import failed, and looking at the staging table logs showed the error(s)
Results. Field 'Company account' must be filled in. Results. validateWrite failed on data source 'DocuRefEntity (DocuRefEntity)' |
So, I check that the ActualCompanyId and RefCompanyId fields on both the staging table and the entity have Allow Edit and Allow Edit On Create properties set to Yes, and did a full build, DB sync, entity tables truncate, refresh entity list. Now when I try an import, the Entity processing status tab shows Failed, with the Execution log form showing the error below
Results. 'FileContents' is required when attaching a file Results. validateWrite failed on data source 'DocuRefEntity (DocuRefEntity)' |
This appeared to be resolved by checking the mapping & ensuring the FileContentsFilename field was mapped from Source to Staging, but now I'm back to essentially the same error I started with:
Results. insert not allowed for field 'DocuRefEntity.RefCompanyId' |
I've tried the mapping change suggested on this thread to no avail: are there other possibilities people would recommend?