function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Simon WhightSimon Whight 

Publisher Action - why do I need VisualForce to do an action?

I was going to make an Apex trigger as part of sorting out our company's workflow. With the advent of Process Builder, doing workflow is now in the remit of click to create.

However, one of the things I want to do isn't possible. It still requires a trigger. It is purely an action: send an email to all related contacts on a Contract via the Account.

Why, when making a Publisher Action, do you need a Visualforce Page? I understand you need it for something that is a bit more visual, where you action then needs to go to a page requiring user input, but I simply want something to happen. Can you bypass the VisualForce aspect of this somehow?
You still need a Visualforce page, as the publisher action simply opens a popup - it can't start some processing in the background.  However, your Visualforce page can simply put out a message that the email send has taken place and ask the user to close it.