Deleting a member or collection follows a very similar pattern to updating a member attribute and indeed uses the same staging table (mdm.tblStgMemberAttribute
) to do so. MDS follows the good practice of never permanently (or "hard") deleting any data and instead the record in the table is marked as "De-Activated".
The process to de-activate a member is to update a system attribute of the member named MDMMemberStatus
. This will prevent it from appearing in the MDS user interface. The example that follows sets the value of MDMMemberStatus
to "De-Activated" for the store:
/* Insert a record into the staging table that will mark a member as deactivated */ USE MDS -- replace with the name of your master data repository GO /* Declare the variables for use in the insert statement */ DECLARE @ModelName nvarchar(50) DECLARE @EntityName nvarchar(50) /* Set the variables appropriately */ SET @ModelName = 'Store' SET @EntityName = 'Store' /* Insert records...