T
Twenty5mo ago
F alko

Cannot find field metadata item for field name somethingDeleted on object person

I deleted a field and now I can no longer go to the detail page.
7 Replies
marie
marie5mo ago
Hi F alko! Are you self-hosting or using the service online? Which detail page are you referring to?
F alko
F alkoOP5mo ago
Self hosting. It happens on current main when a history record refers to a change in a deleted field
marie
marie5mo ago
Could you share a screenshot or a short video please?
F alko
F alkoOP5mo ago
F alko
F alkoOP5mo ago
Problem is here:
if (!fieldMetadataItem) {
throw new Error(
`Cannot find field metadata item for field name ${diffKey} on object ${mainObjectMetadataItem.nameSingular}`,
);
}
if (!fieldMetadataItem) {
throw new Error(
`Cannot find field metadata item for field name ${diffKey} on object ${mainObjectMetadataItem.nameSingular}`,
);
}
If we change it to return null; instead of throwing an error, it sort of works. Simple returning a EventFieldDiff doesn't work, fieldMetadataItem is required, eventho it is defined as fieldMetadataItem | undefined.
marie
marie5mo ago
I see - thanks a lot for your feedback, that's very useful for us!. As you may have guessed, we are trying to log an activity on a no-longer-existing field. I have created a bug report that we will try to tackle soon, but in the meantime, you should be able to unblock yourself by deleting the rows logging the change of activity on the deleted fields from your workspace's timelineActivity table; in your specific case from the window, rows containing properties with isACoolGuy (eg {"diff":{"isACoolGuy":{"after":false,"before":true}}}). (and thanks for reporting the display issue at the beginning, I am opening a PR for that too)
charles
charles4mo ago
Let's prioritize today/on Monday, this seems to be a very annoying issue fixed 🙂
Want results from more Discord servers?
Add your server