Update Account Field with Task Notes (based on Subject)
What I want to do
On the account object, I have a field called "Current_Status__c" where my reps can update information about their account for the week. The problem with this is that I want to be able to have the history of each of these statuses, so I was thinking the best might be to "log a call" or use "new task" with the subject line of "Status Update". The rep would fill out the "Comments" sections which Salesforce calls "Description" and then their information would automatically move to the "Current_Status__c" field on the account. Each week the rep would "log a call" or use "new task" again and the "Current_Status__c" field would be overwritten with the latest information. I already have a "status history" field that checks whenever "Current_Status__c" is changed and adds the latest info to the history field.
What I need (ie. Everything)
- Should I use "log a call" and just make the subject "Status Update" or use "new task"? Is there a benefit to either one?
- The actual apex code on how to do this
- Test code
- Any other information on how to deploy this to production. I can use the Sandbox.
I've found a couple other discussions that I could repurpose for my situation but I don't know how to write the test code and what I should use to actually deploy my code. I'm willing to learn and piece things together if folks can point me in the right direction.
Thanks again to all those willing and able to help. I really appreciate it.
Select the latest TASK with Subject of "Status Update" or move info to Opportunity...Help please
I am completely new to triggers. I have some basic Java programming skills, but haven't setup any triggers for my organization.
I am trying to create a report (Activities with Opportunities) to show the last activity/task on an opportunity that has the subject of "Status Update". Please note that an opportunity can have multiple tasks with the subject of "Status Update" as our sales team is constantly (and irregularly) updating these statuses. I would like to show ONLY the latest one in my report. I've been on the phone with Salesforce and they were no help here.
I am open to ideas on how to do this:
- Perhaps creating a checkbox on the task that marks it as the latest one so that I could use it as a filter for my report
- Perhaps moving the info from the "comments" field on the "status update" task to a field on the opportunity whenever a new "status update" task it added to an opportunity
Any help as well as some introduction on how to incorporate this into my production environment (we have the Enterprise edition), would be greatly appreciated. Thanks in advance.