You need to sign in to do that

Don't have an account?

imoderni

# Help with with Stage/Probability's & Profits

Hello,

I am new to "customizing" field layouts in Salesforce. I spent about 3 hours on the phone with salesforce customer service only to be directed to developerforce.com because they couldn't figure out the formula. So here goes.

I am trying to create a field that gives the "probability"sum based on "Expected Profit" sales minus the different stages/probability %. Can anyone help me with this type of formula?

Also :

1. Is there any way to remove an "anchored" field out of a page layout?

2. How do you change the name of a field without screwing everything up that's linked to it?

I'm so confused! someone please help!

Aimee

Amber Neill

Aimee,

Try this:

Probability * Amount

The field names above are likely different, but that's how I'd tackle it.

That would give you a currency field that would change as the stage (and thereby the Probability) field changes.

I hope this helps and makes sense!

Thanks,

Amber

## All Answers

Amber NeillAimee,

I'm a bit confused about the formula you're trying to write. Can you give us some more information? Examples (with small numbers) would be super helpful! :-)

As for your numbered questions, here goes:

1.) Nope. Wish you could! I've moved those types of fields all the way down to the bottom of the page layout and hope your users don't see it and get confused.

2.) You're gonna love this...changing the field name renames it everywhere else in Salesforce! Reports, formula fields, etc. You will get a warning about merge fields in email templates and external integrations, but that's not too hard to tackle!

I hope this helps!

Amber

Enth

Create a formula field, e.g. Expected Profit, of type currency. The formula should be very simple, but without knowing what your Cost field is called I can't provide it for you exactly, so here's a basic example, replace enth__Cost__c with your own custom Cost field:

This works because ExpectedRevenue is already calculated by Salesforce using your Opp Probability.

Now, if you're trying to get the cost from a custom field on your Opportunity Line Items, or on your Product, that will need a bit more work, but is still possible. Let me know if you need a explanation of this.

As for your other questions:

1. Mandatory fields cannot be removed from the layout. You can either make them non-mandatory (if not system fields) at the page layout or object definition (would need to know which fields you're talking about to be specific). You can also use Field Level Security to hide a field that is anchored on a page layout - but don't do this for mandatory fields or you wont be able to save any records!

2. You can change the label or name of a field and the only impact it will have is on Mail Merge Documents and Email Templates. If you have Apex or Visualforce code it will only be impacted if you change the field name and not the label. If you do this in a sandbox you'll soon know if there's any impact.

HTH

imoderni

Hello HTH & Amber -

Thank you for responding! Sorry I was so vague about what we're trying to do. I'll try to explain this as best as I can.

In our "Opportunities" tab - whenever we change the STAGE field to reflect the status of an order, the PROBABILITY (%) field reflects a new percentage. We want to create a field called EXPECTED PROFIT ($) PROBABILITY in which this field takes the EXPECTED PROFIT ($) - FULL (we've already created this custom field) calculation and the PROBABILTY (%) giving us the "probability" of our profit. I'm not sure how to create this formula?

HTH, how would I create a formula to reflect each % level of the profit when the stage is changed? We currently are using 5%, 10%, 66% and 100%.

Did this make any sense?

Thanks Aimee

Amber Neill

Aimee,

Try this:

Probability * Amount

The field names above are likely different, but that's how I'd tackle it.

That would give you a currency field that would change as the stage (and thereby the Probability) field changes.

I hope this helps and makes sense!

Thanks,

Amber

imoderni

Amber - I

t worked!! Thanks so much for your help!

imoderni

Hi Amber,

I have one more for you. I've tried to create a formula that calculates 10% of the sales amount to give me the Expected commission payment by the different stages of Probablity (%). My problem is that I don't know how to implement the 10%.

I thought the formula would be ---- Expected Commission Payment = Probablity*(.90)Cost_of_Goods__c. That didn't work. It only worked when the (.90) was not included.

Can you help me with this one??

Thanks in advance!

Aimee

Amber NeillAimee,

Forgive me if this sounds crass, but I think you're over thinking this.

I believe, and please test this, that the probability field holds a % already. You'd establish that value for each stage when creating the "sales process".

I could also be massively misunderstanding what you're trying to do.

Let me know if I'm way off base and I'll do what I can to help!

Thanks,

Amber

imoderni

My boss is driving me nuts with this. LOL He wants to reflect the different probability stages (5%, 10% 66% and 100%) of what our commission will be. So if we're at a stage of 100% probablity our sales number should be the Cost of Goods x 10% = our commision.... if the stage is say at 50% our commission would be at (I'm guessing) Cost of goods (sales) x 5% (since 5 is 1/2 of 10)...

God... I feel like i'm falling deeper in this hole because it's do confusing! LOL

Personally, I just want the formula to be our commission off of our Cost of Goods sales which would be Cost of Goods (sales) x 10% = Expected Commission. I just can't figure out how to get the x10% to stick in the formula.

Amber Neill

Aimee,

Oh ok! That makes sense! I get it!

My recommedation is to have 2 formuala fields.

The first will "convert' the stage to the % commission. I'd use a nested IF statement

IF(

ISPICKVAL(Stage, "New"), 10%, IF(

ISPICKVAL(Stage, "In Progress"), 50%, IF(

ISPICKVAL (Stage, "Closed"), 100%)))

(There are probably not enough or too many parenthesis on this. Feel free to modify for your purposes.)

Then, the second formula uses this formula field to do the "real" math.

Cost_of_Goods * % commission

I hope this helps!

Amber

p.s. I have dozens of these intermediary fields that aren't included on any page layout. Not elegant, but it'll get you what you need....I think! :-)

imoderniOh my goodness. I don't know if I can figure this out. I'll give it a try.

Amber Neill

You can do it!

If you get stuck, post the code here and we'll tackle it together!

Amber

imoderni

I'm stuck ... LOL.

I'm going to forego the stages for now.I think what I want to do now is just get the formula to calculate what our commission will be from our Cost of Goods (Sale) which is 10%

How can I get the formula to accept Cost of Goods x 10%?

So my field would look like this

Cost of Goods 1500

Expected Commission $150

Thanks!! Aimee

i'm so sorry for being a pain in the butt. I have absolutely no experience with this type of thing and was just thrown into it. LOL

Amber Neill

No worries Aimee! We're here to help!

Ok, so your formula will look something like this:

Cost_of_Goods__c * 0.10

The formula field should be of type currency and the field name...use the Insert Field button to make sure you have the syntax right.

Let me know how far you get!

Good luck!

Amber

imoderniIT WORKED!!! AMBER - YOU ARE THE BEST!!!! Thank you so much for helping me!

Amber NeillWhoooo hooooo!

Congrats! You're now a formula expert! :smileyhappy:

Amber