issue #21667: Add test for used function since we know we can not delete unless the record is unused. Fix customer.
issue #21633: Fix sales order used check.
issue #21666: Fix prospect update check.
Merge pull request #920 from jrogelstad/21666

Fix record deletion problems