I would like to write a trigger(after insert) on the LMA, license object. the documentation says - after - triggers are fine and there shouldn't be any mandatory fields on the License object. I want to update a custom field on the License object once the license record is inserted in LMO through the trigger. Trigger makes an API call to push the Subscriber org's id to a different db. creates a record in the db and gets back the primary key of the record and update it in the License record in Salesforce. Can I do this kind of coding on License object? will there be any issues in creating the License records in LMO? Please share any good or bad experiences. Thank you.
As far as I know this is fine. The warning is really that if you have something, anything, that prevents the license record from saving you end up losing that license record.
However if you're making a callout you'll need to use Queueable - you can't make callouts directly from trigger contexts. That's actually good here since a callout failure in an async context won't cause the insert of the license to fail.
You also may want to plan on refreshing licenses once in a while just to be sure you aren't missing any.