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
JVIowaJVIowa 

Chatter Publisher Actions

I am having trouble with a Publisher Action that I have added to the Account Page.  The publisher action is a Create a Record action.  The Create a Record action is creating a record with an object type that comes from my managed package.  There is a trigger behind this object and the trigger updates some fields on the object.  It appears that there is some namespacing issues in the Salesforce logic that is creating this record.  The interesting thing is that if I create the record using the standard Salesforce UI (clicking the new button and saving the record) my trigger works fine.  So there is something different about how the Publisher Action is creating the record than the standard UI.  I can tell this also because the debug log says the operation is  'chatter/handlers/quickcreate' when I create from the Publisher Action and it is the /objecttoken/e when I create with the standard UI. 

 

I think this is more of underlying Salesforce issue since the trigger is fine under the standard UI create but fails under the publisher action.  So hopefully one the Salesforce engineers can dig into this a little deeper. The error the publisher UI is throwing up is a DMLException that says "bad field names on insert/update call".  The field names are not bad and have worked for over a year, though the fields are defined in the managed namespace.  Anyway, very werid behavior and not consistent across the Salesforce application.

 

Please help!  I would really love to use the Publisher Actions as an option for users to create records.

CharlieSCharlieS

I think I've hit a similar problem.

 

As I understand it when a trigger fires from a publisher action, the trigger only has visibility of the fields that are explicitly part of the action layout + any predefined fields.

(Unlike when you create the record via the normal UI, the trigger has access to all the fields on the object)

 

Not sure if this helps your problem, but it is more evidence that the publisher actions don't behave the same as the UI.  I've raised this as a 'bug' with salesforce...