Fun Series January - Salesforce - Survey App Challenge

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Project Overview

We have launched a new Fun Challenge series to help our members learn new skills/technologies while getting used to the Topcoder platform. This challenge is about Salesforce. In this challenge, we will explore Apex Triggers.

Important :
This is a fun and learning challenge. No prizes will be awarded for completing the challenge.

Business Requirements

"Fun&Learn" company wants to develop a survey solution. Fun&Learn has identified Salesforce.com as their desired platform to implement the solution. We will help them build the survey application, across a series of challenges. In this month's challenge, we will explore using Apex Triggers and Chatter.

Help Documentation & Tutorials

  1. https://developer.salesforce.com/trailhead/apex_triggers/apex_triggers_intro
  2. https://help.salesforce.com/HTViewHelpDoc?id=code_define_trigger.htm
  3. https://developer.salesforce.com/page/Governors_in_Apex_Code
  4. https://developer.salesforce.com/page/Best_Practice%3A_Bulkify_Your_Code

Technical Requirements

You need a Salesforce.com Developer account to complete this challenge. You can sign up a free account here
A survey is a collection of Questions. A question can be part of multiple surveys. To keep things simple, we will assume all questions are of Free Text.

In this challenge, we will write an apex trigger on Survey Response that will do a Chatter post on the Survey object.

In Previous challenges, we built the object schema. If you haven't participated in previous challenges, please use the package to install the objects and workflows

The new database schema.

This Challenge Requirements

  1. Enable Feed Tracking on the custom object Survey (https://success.salesforce.com/answers?id=90630000000gzHQAAY)

  2. Create an after insert trigger on Survey Response object

  3. Every time a new survey response is created, create a feed item on Survey object. The body of the chatter post should read. "A new response has been posted" along with the response submitted by the survey taker.

After the trigger executes, the Chatter page on Survey will look something like this.

 



Final Submission Guidelines

Please provide your Apex Trigger source code.

Please ensure you have bulkfied your trigger and handled Governor Limits. Please see the help section for related links and tutorials

Important :
This is a fun and learning challenge. No prizes will be awarded for completing the challenge.

 

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30052587