2

My company is provisioning trials using Trialforce. What I need to do is write a post install script which will make an API callout to a third party API and insert a new record in custom setting as soon as the trial is provisioned.

Now I went through the post install script info on this link:

https://help.salesforce.com/HTViewHelpDoc?id=apex_post_install_script.htm&language=en_US

and it says in the Notes that "You can’t run a post install script in a new trial organization provisioned using Trialforce. The script only runs when a subscriber installs your package in an existing organization."

Is there another way besides a install script which will do the same job? Or is there a way to make a post install script run in a trial?

1

Could you have a "start here" page where the installer clicks some button to provision the org? You can't trigger on user for login times etc. so I think that'd be your only option. Of course you could remove the click and do any provisioning the page's action parameter.

  • I did not understand, you want me to put a welcome page with a controller which will do the job? – codeinprogress Dec 10 '13 at 16:40
  • Yeah, I think that's the only way you'd be able to do it really. Or have a scheduled job perhaps, though not sure if they can be scheduled automatically without an install script. – Matt Lacey Dec 11 '13 at 0:13
  • Any ideas on how I can redirect them to a vf page after the trial is provisioned? Would be a big help. Thanks. – codeinprogress Dec 11 '13 at 14:08
  • You could add a tab for the Visualforce page and then set that to be their default tab I think... it's been a while since I tried it. – Matt Lacey Dec 11 '13 at 23:32
  • but will this tab open everytime they log in? cause i want this function (the api call populating custom setting) to take place only once, that is when they login the first time. – codeinprogress Dec 12 '13 at 14:13

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.