How To: Mark Contact Active or Inactive

Page approved.




Marking a contact as active or inactive is commonly used when a contact with linked Sales Orders has left your customer/company or is no longer required (such as a contact moving departments within a large organisation).

  1. Open a Customer screen (show me how).
  2. Load the required customer record.
  3. Open the [ Customer | Detail | Address ] tab.
  4. Click 'All Addresses - Detail' icon on the top pane's action buttons to open the All Address Details dialog. This shows all active addresses in the top grid and all active contacts in the lower grid.
    Note: the BtnCurrentAddressX.jpg and BtnInactiveX.jpg buttons immediately below each grid allow you to switch views.

Deactivate a Contact shown in the Active View

  1. Focus on one contact or green-select multiple contacts to deactivate more than one.
  2. Click on the BtnDeactivate.jpg button in the bottom right of the dialog. This action sets the selected contact's inactivate_date field to today's date.
  3. Click the 'OK' button to close the dialog.

Activate a Contact shown in the Inactive View

  1. Click anywhere in the lower grid.
  2. Click on the BtnInactiveX.jpg button to show all inactive contacts.
  3. Focus on one contact or green-select multiple contacts to activate more than one.
  4. Click on the BtnActivateViewX.jpg button in the bottom right of the dialog. This action resets the selected contact's inactive_date field to zero (i.e. 30 Dec 1899).
  5. Click the 'OK' button to close the dialog.

Data Query

When run in the Data Query screen, the following will list all Customers/Suppliers with inactive contacts:

SELECT co.company_code, co.company_name
     , CASE ad.atype_id
         WHEN '1' THEN 'Invoice'
         WHEN '2' THEN 'Delivery'
         WHEN '3' THEN 'Statement'
         WHEN '4' THEN 'Other'
         ELSE 'Unrecognised'
       END AS 'address_type'
     , ad.address1, ad.address2, ad.locality, ad.town
     , ad.county, ad.postcode, cy.country
     , ct.title, ct.forename, ct.surname
     , ct.inactive_date
       FROM contact AS ct
INNER JOIN address AS ad ON ad.address_id = ct.address_id
INNER JOIN country AS cy ON cy.country_id = ad.country_id
INNER JOIN company AS co ON co.company_id = ct.company_id
WHERE ct.inactive_date <> '1899-12-30 00:00:00.000'
ORDER BY co.company_code, ad.address_id, ct.contact_id
/************************************************************
  Customers - List Inactive Contacts
 
  This data query is provided as a teaching aid and is not
  covered by your support agreement
 
  17-Aug-2011                                Created (GKS)
************************************************************/


WARNING icon
Data Query is an Advanced User feature.

See Also

Visit KhaosWikiX at https://support.khaoscontrol.com/wiki_kcx/ to see the following:

Contact the Khaos Team