Adding a follower button to the row action

Hi, Rizvan,

This will take some custom coding to do, but it can be done! Salesforce uses the EntittySubscription Sobject to hold information about users following records. So, create a model on EntitySubscription, with a condition where the SubscriberId equals the Id of the user viewing the page (condition type “Userinfo of page viewer”). Then, for your row action, get the Account’s Id from the row by

var accountId = arguments[0].item.row; 

Create a new row in the EntitySubscription model by 

var newRow = subscriptionModel.createRow({additionalConditions: [{field: 'ParentId', value: acctId}]});<br>subscriptionModel.save();

Of course, it will get a little more complicated to determine which accounts the user is already following, and displaying these row actions differently. This post might be helpful to you? But hopefully that’s enough to get you started!

Emily