[Human Readable Change History] Static entity ID displays [EMPTY]

Forge Component
Published on 28 Jan by Johan den Ouden
20 votes
Published on 28 Jan by Johan den Ouden
Hi Guys,

I have a entity CUSTOMER and CONTACT and a static enitty CONTACT_TYPE the CONTACT has a ref CustomerId and ContractTypeId. When comparing the records when adding a new row to the CONTACT it gives the following message:
Customer defined as '05-01-2015 18:33:31'
Contact Type defined as [Empty]

Bit strange because it shows the Customer datetime instead of the customer label and the contacttype is empty.

Should the Human readble change history function not gets the default defined label field from the entity? In this case the default label of the Customer table is the Name and not the date. And the contact type label (phone, email etc) should not be empty?
In the function Translation_GetRefEntityNameAttribute I added befor the GetIdentificationAttribs_FirstTry query a query to fetch the entity label atribute. If defined I use this record else it continues to the other querys. Maybe its a good idea to use this as default? The message is now:

Relaties defined as 'Freek'
Contact Type defined as [Empty]
Contact defined as '06xxxxxx'

The only problem I have is that the Contact Type (static entity) label is still empty why is this?
So I found out that there where a few more improvements to the Human-readable change history.
In the function Translation_BuildChangedString_Record the query GetEntity should have a connection with the espace and there should be a filter if the esapce is active. Because if you delete a espace the old entity will stay there on active only the esapce is not active anymore.

Then the query GetEntityAttributes should change the filter to get the enity by name to get entity by id from the GetEntity query.

Hope somebody is reading this because it feels a bit lonely without any replys.