If your get "Cannot link an already linked attachment ($entityType:$link)." error after upgrading to v10.0.8 or greater, check whether you do not set an excessive 'parent' or 'related' to a created Attachment entry. It can be in custom code or in Formula script code. You should have either one or another.
