0

I am attempting to create a routine that will update Account fields for specific entitlements. So entitlement X is added to the account, the trigger fires and updates the start/end date fields on the parent account.

This works when changing entitlement fields directly. So if I assign a new entitlement or edit an existing entitlement the trigger fires.

When the entitlement expires 'naturally', by which I mean the current date is past the end date and the status changes from Active to Expired, I'd expect the Update trigger to fire and it should clear the start/end date.

I assume there is a SalesForce process that expires these entitlments. Do update triggers fire when this happen? Again changing the dates and forcing entitlement to expire manually works and executes the trigger as expected.

SIA

  if (Trigger.isAfter && Trigger.isUpdate) 
    {
        for (Entitlement afterUpdate: trigger.new)
        {
//call procedure to update account
            
        }

    }

1 Answer 1

0

Trigger would not work in this case, it would only fire if you make any update manually or by some other custom actions.

You need to write apex scheduler which will check for expire status and clear the dates.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .