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
Mai SackerlotzkyMai Sackerlotzky 

Do workflow rules trigger when you are using a visualforce page?

I'm trying to setup a workflow rule that writes the values of custom fields created directly in my organization to fields that exist on a visualforce page in a managed package. The workflow rule criteria is set to "created and everytime the record is edited."

The workflow rule works as expected when on a standard page; but the workflow rule isn't triggered when I edit fields on the visualforce page.

Is there a limitation preventing workflow rules from triggering when a visualforce page is being used for both the edit and detail views of the record? If so, is there a work around? I would prefer not to use an apex trigger for this particular task.

Thank you for your help.
Karan Khanna 6Karan Khanna 6
Hi Mai,

there is no as such different functionality for VF Pages, workflow rules fires whenever we make DML operation into database irrespective of whether the record was inserted/updated through standard page or vfpage.

it seems your problem is hiding somewhere else. could you provide more details?
Mai SackerlotzkyMai Sackerlotzky
Hi Karan,

Could it possibly be related to the visualforce page or custom fields being a part of a managed package?

Here is all the information I have:
I'm trying to link the custom fields of two separate packages in my organization, one a managed package called FedCapture and another an unmanaged package called INPUT 2.0. As the two packages are designed to be linked, the field types are identical (I've already double checked this).

The workflow rule I've put into place maps several fields; but for simplicity sake, let's use one pairing as an example. My FedCapture managed package includes a field called "INPUT Estimated Value", it's a 2 decimal currency data type. The INPUT 2.0 unmanaged package includes a field called "GovWin IQ Estimated Value", this is also a 2 decimal currency data type.

My workflow rule is set to the following criteria:
"Evaluate the rule when a record is created, and every time it’s edited"
Rule Criteria: "Opportunity: Opportunity Name NOT EQUAL TO null"

When the rule criteria evaluates to true, it fires a field update to the FedCapture "INPUT Estimated Value" to match the INPUT 2.0 "GovWinIQ Estimated Value"

To test this setup, I created a new Opportunity record, input a value into the INPUT 2.0 "GovWinIQ Estimated Value" field and clicked "Save". The FedCapture "INPUT Estimated Value" field was updated to match, as expected.
Next, I modified the "GovWinIQ Estimated Value" field. This update was NOT pushed to the "INPUT Estimated Value" field as expected.
Then, I deleted the value in the "INPUT Estimated Value" field, saved, edited another part of the record, and saved again. Once again, the "GovWinIQ Estimated Value" field value was NOT pushed to the "INPUT Estimated Value" field. All of these testing tasks were utilizing the visualforce page.

To troubleshoot the error, I removed the page overrides for the visualforce pages and ran the same exact test scenarios with a standard page. On the standard page, the workflow rule functioned as expected, and the "GovWinIQ Estimated Value" field value was consistently pushed to the "INPUT Estimated Value" field. It was at this point in my testing that I decided to defer to the forums for help.

Is there another test I can run that may provide us the cause of this issue?
Karan Khanna 6Karan Khanna 6
I assume if Vf page is part of Managed package then you wont be able to share Controller behind it.

did you check Debug logs? they might give some clue.
I have seen this issue, too. Any solutions?
Sys Admin 71Sys Admin 71
I got the same issue that after a user updates a record through a Visualforce page my Workflows do not trigger.
Same issue here... any solution?