+ Start a Discussion

Trigger NOT working from Partner Portal

Hi all,

I have an trigger on a custom object, which is working fine when a record is created from Admin. However, when a record is created on the same object from Partner Portal, the trigger is not being fired.

Please let me know, whats missing. Am I missing some setting?

- SalesForce Developer
David VPDavid VP

Are you sure your trigger isn't being blocked by things like validation rules or trying to save into fields that are invisible or read-only for the partner profile ...


Put debug statements in your code and watch the debug log closely.



Yes, there is a validation rule on one of the fields.

Also, one required field is hidden for Partner Portal.

Does this block triggers from firing?

David VPDavid VP

It does block your trigger if for example they're trying to update fields that the portal user doesn't have access too.


They will still fire but won't be able to do their jobs because they encountered an error.

Add System.debug() and monitor your debug logs closely.


Hi David,


Actually, as soon as a record is created it is sent to a queue. i.e., the owner of the record is set to queue. The trigger we created, creates sharing users for the record created on the custom object.

We delayed the the queue by 1hr and found that the trigger is working properly. However, when the queue takes over the record after 1hr, it is deleting all the share users.


We now know that the queue is either deleting all the sharing records of the created object or blocking the trigger. Still looking for an alternate solution.


I tried to adding some debug statements to the code. But, when using the Partner portal to create records, no debug messages are found in the log.


Does System.debug work with Partner portal?


Any help is highly appreciated.