title: Invalidate Members in MDS User Defined Script
body: <p>I'm working on a proof-of-concept to implement Master Data Services in SQL Server 2017.  I've loaded an entity with the staging tables and processed the batch.  I've set up business rules to validate members one by one and all that's worked just fine.</p>
  
  <p>Now I'm trying to create a User Defined Script (stored procedure) as a custom action that will have more complicated logic and invalidate records accordingly. With the logic being more complicated, I need this to be done in an action (stored procedure, set based) rather than in a condition (function, iterative). </p>
  
  <p>How would I invalidate records programmatically in a custom action? </p>