You need to sign in to do that
Don't have an account?
Trigger working inside the UI, but not on a VisualForce page
I have a trigger that creates a lead record from a custom object record that meets the criteria. The trigger works fine if I insert the custom object record via the standard user interface. If I try to insert the record via a VF page, the trigger fails with an Invalid Parameter error.
When I look at the debug logs, it's capturing the information on the vf page, but when it inserts, it's failing. I can't tell if it's failing on insert of the custom object record or the
If I turn the trigger off, I can insert the custom object record via the VF page, if I turn it back on, it fails.
I'm completely confused by this. Any ideas? I went through all of through all of the fields to be sure they matched in type and size because I couldn't think of anything I could troubleshoot?
The issued ended up being that the trigger was executing based on input from a sites page trying to update a standard object in salesforce. I have since learned that you cannot edit standard objects via a sites page unless you are using a salesforce portal solution.
All Answers
Are you missing required fields when inserting on the VF page?
Nope - that was the first thing I checked.
hi
Can u share the code or error which you got ?
This sounds like a Profile permissions issue.
Can you share a little bit more about the use case for the VF page? Are you using it in a Sites application?
The issued ended up being that the trigger was executing based on input from a sites page trying to update a standard object in salesforce. I have since learned that you cannot edit standard objects via a sites page unless you are using a salesforce portal solution.