0

We noticed when a user registers for a trial from Appexchange it does not run Insert triggers. Seems it's just creating a snapshot of data instead (but with new record Ids). Is there any way we could run a Apex or similar post script please? (Without user intervention) Appreciate any clue/tip or advise on this.

We have some sample data records in Trialforce which rely on record Ids, and when new records are created for the new instance by SF, they will have set of new Ids. Therefore making the text values containing Id values Invalid (these string values are generated based on some business logic after insert/update/undelete).

2 Answers 2

2

TrialForce literally clones the data without running all the business logic that may be present. This is done to minimize the amount of time it takes to set up a new trial (and also why there are limits to the trial's data size). What you'll probably want to do is write a default landing page that will populate these text fields with the appropriate ID values when they initially log in for the first time. Unfortunately, there really isn't a better way to approach this problem. It's still possible to do so "automatically", but you'll have to make a conscious effort to do so.

1
  • thanks @sdfcfox, figured out a way, posting below as answer. Not so hard to implement though. Sep 14, 2017 at 5:40
0

Figured out a way using,

  1. Custom setting (To have a flag to avoid method being called repeatedly)
  2. Login Flow
  3. @InvocableMethod (called from Login flow)

This seems working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.