3

I want to create STAGE based chart in my salesforce org. Please find the screenshot for the sample.

enter image description here

1
  • Why you dont follow the instructions from the page you took this image? basically copy and paste, they provide both vf page and the controller, the blog address in case you lost it is, bobbuzzard.blogspot.com.au/2012/05/… – manza Jul 30 '16 at 23:40
3

You don't need necessarily Visualforce or Apex for this. You could use Visualforce and Apex to dynamically load the stages and build the visual, but since something like the sales cycle is generally something that doesn't change all that at often, many times people just use a formula field for this to avoid having to code the solution.

You basically just need to upload a graphic for each sales cycle stage, and show that particular image depending on the Stage. See the example below

CASE(
    TEXT(StageName),
    'Stage 1', IMAGE("/resource/Stage_1_Image", "Stage1", 50, 600),
    'Stage 2', IMAGE("/resource/Stage_2_Image", "Stage2", 50, 600),
    'Stage 3', IMAGE("/resource/Stage_3_Image", "Stage3", 50, 600),
    ....
    ....
    'Stage X', IMAGE("/resource/Stage_X_Image", "StageX", 50, 600),
    IMAGE("/resource/Default_Image", "Deafault", 50, 600)
)

I always suggest trying clicks over code when you can. This will work just fine. I can think of 3 reasons why this may not work and you might want to consider a coded solution (There could be more, but this is what I can think of).

  1. You have many Opportunity Record Types all with different sales cycles and different stages. Maintaining the formula fields may become to cumbersome.
  2. You have a large number of Opportunity stages so that the formula size becomes too large and you are unable to fit them all within a formula.
  3. You add and change opportunity stage names often for whatever reason.

If you don't fall into one of those reasons, then I would suggest first trying the formula field solution as why not leverage the native capabilities of the platform when you can.

You will obviously have to replace my stage names with your own as well as replace the resource file paths with your file names.

2
  • Hi Chris, could you please share the exact code stuff if you have ? – Nandu Raja Apr 20 '15 at 13:43
  • 3
    I gave you what you needed. I obviously cannot give exact doe as I don't have access to your instance. You need to upload the images, and replace my resource file paths with your own, and replace my Stage Name Text with the actual Stage Names you use. What I gave is more than enough for you to do this. – Chris Duncombe Apr 20 '15 at 15:31
0

You can enable the new Sales Path feature which was introduced in Spring '15 to give you this functionality.

Sales Path can be accessed by clicking Customize > Sales Path > Settings, then click Enable. You can then set up a sales path by clicking New Sales Path and going through the steps.

Sales Path also allows you to give additional information - such as highlighting the fields they need to fill in and links to additional documentation - to your Sales Reps as they go through your Sales Process to help guide them through it.

1
  • Is sales path only for Salesforce 1...? I hope not. I will try this in my own org. – the_phantom Apr 20 '15 at 19:03
0

I wrote a blog on designing the scenario with the Lightning Design System, visualforce & apex.

Blog Post - http://www.minerva18.com/blog/dynamic-reusable-lightning-design-status-visual-in-salesforce/

I hope it helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.