• Satheesh Kumar
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I am trying to write a trigger on the License object (sfLma__License__c) in my License Management org.. the purpose of this trigger to make a callout (in a future context) to my service to notify it of any new licenses or updates..
This is my trigger as of now
 
trigger MyLicenseTrigger on sfLma__License__c (after insert, after update) {

    for(sfLma__License__c newLicense: Trigger.newMap.values()) {
        LmoCalloutHelper.reportLicense(newLicense);
    }
}



Now if I update any editable field of this license from the UI (for eg. the Lead field) the trigger fires.. all good.


But if the managed package which is linked to the LMO is installed or uninstalled, the trigger does NOT fire.
On digging a bit, I see that on install/uninstall, the License Status is changed. But License Status is a formula field which obviously doesnt fire triggers.


But the formula field is just a $recordType.Name, so basically it seems any install/uninstall updates the Record Type of a license record.
So on install/uninstall of a package, if the Record Type is updated, why does my trigger not fire?


I am trying to write a trigger on the License object (sfLma__License__c) in my License Management org.. the purpose of this trigger to make a callout (in a future context) to my service to notify it of any new licenses or updates..
This is my trigger as of now
 
trigger MyLicenseTrigger on sfLma__License__c (after insert, after update) {

    for(sfLma__License__c newLicense: Trigger.newMap.values()) {
        LmoCalloutHelper.reportLicense(newLicense);
    }
}



Now if I update any editable field of this license from the UI (for eg. the Lead field) the trigger fires.. all good.


But if the managed package which is linked to the LMO is installed or uninstalled, the trigger does NOT fire.
On digging a bit, I see that on install/uninstall, the License Status is changed. But License Status is a formula field which obviously doesnt fire triggers.


But the formula field is just a $recordType.Name, so basically it seems any install/uninstall updates the Record Type of a license record.
So on install/uninstall of a package, if the Record Type is updated, why does my trigger not fire?


I am trying to write a trigger on the License object (sfLma__License__c) in my License Management org.. the purpose of this trigger to make a callout (in a future context) to my service to notify it of any new licenses or updates..
This is my trigger as of now
 
trigger MyLicenseTrigger on sfLma__License__c (after insert, after update) {

    for(sfLma__License__c newLicense: Trigger.newMap.values()) {
        LmoCalloutHelper.reportLicense(newLicense);
    }
}



Now if I update any editable field of this license from the UI (for eg. the Lead field) the trigger fires.. all good.


But if the managed package which is linked to the LMO is installed or uninstalled, the trigger does NOT fire.
On digging a bit, I see that on install/uninstall, the License Status is changed. But License Status is a formula field which obviously doesnt fire triggers.


But the formula field is just a $recordType.Name, so basically it seems any install/uninstall updates the Record Type of a license record.
So on install/uninstall of a package, if the Record Type is updated, why does my trigger not fire?