This logic hook checks whether a record is new and a checkbox is checked, then links an account to the record based on the related contact. It works perfectly when a user creates a new record, but not when created by a process definition. The process…