- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
05-10-2010 03:23 PM
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?
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!
Solved! Go to Solution.
05-10-2010 04:39 PM
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!
05-11-2010 06:05 AM
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:
ExpectedRevenue - enth__Cost__c
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.
05-11-2010 06:51 AM
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?
05-11-2010 07:04 AM
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!
05-12-2010 05:52 AM
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!
05-12-2010 06:07 AM
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!
05-12-2010 06:23 AM
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.
05-12-2010 06:35 AM
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
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!
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! :-)