locked
Prevent Custom Entity record to be deactive RRS feed

  • Question

  • I've a custom entity.

    I would like to prevent the record to be deactive : i've below conditions
       -> IF Condition True -> Deactive
       -> Else do not deactive.

    I set the primary entity = custom entity
    message - > SetStateDynamicEntity
    stage = Pre / Synchronous / Server

    Even when condition if false, the record is still getting deactive after showing the error message.

    Please let me know where im going wrong.

    Wednesday, July 7, 2010 6:41 AM

Answers

  • Hi,

    Follow below steps, this will resolve your issue:

    1. Message - SetStateDynamicEntity
    2. Primary Entity - UR Custom Entity
    3. Secondary - none
    4. Stage = Pre Stage
    5. Execution Mode - Syncronous
    6. Step Deployment - Server
    7. Pipeline - PArent Pipeline

    Do not forget to through the below message when condition is FASLE

    throw new InvalidPluginExecutionException("CUSTOM ERROR MESSAGE", ex);

     


    Thanks, Ranjitsingh R | http://mscrm-developer.blogspot.com/ | MS CRM Consultant
    • Marked as answer by Dip_t Thursday, July 8, 2010 6:43 AM
    Thursday, July 8, 2010 6:33 AM

All replies