Has anyone ever "hard deleted" an AR_Salesperson record?

We've gathered a collection of a few dozen salesperson records that essentially "dead" - meaning there are no open orders/invoices, there are no assigned customers or shipto records, no sales activity at all for years..... and they are starting to get in the way.

It's frustrating that Sage doesn't have a way to deactivate old salesreps or hide them (other than customizing views) so I spun up a testing environment to see what would happen if I deleted the AR_Salesrep record via Data File Display and Maintenance.

..... so far, it doesn't seem to have much of an impact....

  • I can still search by the (now deleted) salesperson code in Sales Order and Quote History Inquiry
  • I can still search by the (now deleted) salesperson code in Invoice History Inquiry
  • I was able to run the Salesperson Sales History By Period for the (now deleted) salesperson code and it reported correct totals.
  • I was able to run the Salesperson Commission Report for the (now deleted) salesperson code and it reported correct totals.

What am I missing? What other data / reports would be impacted by a hard-delete of a completely dead salesrep number? 

Thanks in advance for your help and advice! 

  • You have to understand that by deleting all your doing is removing from the SY_User file. Each record in historical files has the salesperson code as a field. That field will never be cleared, the data will always remain there.

  • in reply to BigLouie

    AR_Salesperson, not SY_User.  Slight smile

    Transaction data might be fine.  Some reports may break if they rely on AR_Salesperson values.

  • in reply to BigLouie

    AR_Salesperson but yes, I'm actually relying on that so sales history is still preserved (as it should be). I just want these out of all the salesperson lookups, the report parameters, etc.... 

  • in reply to Kevin M

    EDIT: Nevermind - I think I figured it out.... will update soon

  • in reply to Brett-AAG

    Any Sage report that links to the business object for AR_Salesperson would have unpredictable results for a missing SP record.

  • in reply to Kevin M

    OK so no problems running Customer Sales History or any of the other standard Sage reports.

    I was just overestimating the CPU resources of my test environment. I narrowed the parameters and was more patient with the next run, it completed with accurate data.

    It will still show totals for the deleted salesrep record.... it just isn't able to lookup the salesrep's name to populate it on the report next to the initials. 

    So far, so good - still looking for a reason NOT to do this but I haven't found one so far.

    These salesreps have unused since pre-2021 but just to be safe I think I might try to do July month-end early in the test environment to see if there are any issues.

  • You could add a UDF to AR_Salesperson that could be used to identify the old records.  The lookups could then be setup to filter out those records.

  • in reply to Steve Passmore

    I've used this approach before and it worked great.  A simple checkbox UDF will suffice.

    You can create a system default view for the salesperson lookup where you filter on the UDF.

    If you delete the record in AR_Salesperson, you could end up causing some # 11 errors to occur in any task that attempts to read the AR_Salesperson table for the key that is in another table.  The various inquiry tasks may not produce the error but they will only hold the salesperson record's key (in the SalespersonDivisionNo and SalespersonNo) in them and not other fields like their name.  So even if an error is not produced in the inquiry tasks, you will only see the salesperson number and not any other details.  You may also want to make sure there aren't any records in AR_OpenInvoice with the salesperson numbers that are no longer valid.  If you have any custom reports or modified reports/forms that link add the AR_Salesperson table, you will no longer have a valid link between the tables if using an INNER JOIN which will cause records in the other table to be omitted.