You need to sign in to do that
Don't have an account?
sindhu@demo.com
How to write a trigger on a Chatter post on the Account object
Hi Everyone!! I need a trigger on a Chatter post on the Account object that does the following: • If the hashtag “#request” is used in the post, the trigger creates a record in the Request__c custom object. • The Account ID is populated in Account__c • The Type__c field is “Other” It would be helpful if someone help me out in writing trigger on chatter post on "Account" object. Regards, Sindhu
Which steps have you taken yourself so far ? If you started writing code, it will help if you share that with us.
If you're not sure where to start, having a look at the chatter data model is a good start point: http://developerforce.s3.amazonaws.com/website/pdfs/Chatter-cheatsheet_final.pdf
Without putting a lot of thought into this, I expect you'll want to make a trigger on feeditem, and filter out when the parentobject is of the Account type. Give it a try, and let us know where you run into difficulties.
That is a very good start !
You will most likely want to chek if f.Body contains '#requeste' instead of equals.
There are multiple ways to approach this, what I would do is probably:
If you could try this, you should probably get it working.
ps: use the code block functionality to post code here, realy helps in terms of readability.