Activity Forums Salesforce Questions and Answers Can we write a trigger on the VF page in Salesforce?

  • Can we write a trigger on the VF page in Salesforce?

  • Kirandeep

    Member
    January 14, 2020 at 2:05 pm

    Can we write a trigger on the VF page in Salesforce? Explain.

    • This discussion was modified 6 months, 3 weeks ago by  Kirandeep.
    • This discussion was modified 6 months, 3 weeks ago by  Forcetalks.
    • This discussion was modified 6 months, 3 weeks ago by  Forcetalks.
  • Sumit kumar

    Member
    January 15, 2020 at 1:53 pm

    There is no way to call visualforce page in a trigger.

    If you try to insert a record on one VF page and after hitting Save you want to be redirected to a specific page, I suggest you to check PageReference Class.

    After you call insert in a controller you should return a PageReference instance with URL you want user to be redirected to.

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos