Need help with the Formula Field in Salesforce. I must have not entered the formula properly. Need helpApex Test not updating parent object field based on child object formula fieldsSalesForce Report, to return contacts who have attended 3+ CampaignsFormula field in Campaign Member SectionHow to assign new object to a queue using Process Builder, without using the queue ID?Formula field not calculating properly with nullNeed Help with Formula(Currency)Report Filter Question: Display all records inserted after certain time from datetime fieldCheckbox formula returning #Error when True, correct False value when FalseCompare email to a listProcess Builder formula only partially evaluates(Edited version after trying with one of the proposed solutions)
"I you already know": is this proper English?
Explanation for a joke about a three-legged dog that walks into a bar
Inadvertently nuked my disk permission structure - why?
Why is chess failing to attract big name sponsors?
High income, sudden windfall
How can I tell if there was a power cut while I was out?
Timing/Stack question about abilities triggered during combat
How do I run a game when my PCs have different approaches to combat?
This message is flooding my syslog, how to find where it comes from?
Replacing tongue and groove floorboards: but can't find a match
A fictional island on Earth with "longer" springs and autumns
How can I prevent corporations from growing their own workforce?
expansion with *.txt in the shell doesn't work if no .txt file exists
Commercial jet accompanied by small plane near Seattle
Is it correct to translate English noun adjuncts into adjectives?
Why was Sauron not trying to find the Ring, and instead of preparing for war?
How may I concisely assign different values to a variable, depending on another variable?
Need help with the Formula Field in Salesforce. I must have not entered the formula properly. Need help
Is it legal for private citizens to "impound" e-scooters?
How can I receive packages while in France?
Time travel novel: machine makes clones, clones battle to be the one to get back their life
Trapped in an ocean Temple in Minecraft?
Grid/table with lots of buttons
Examples of simultaneous independent breakthroughs
Need help with the Formula Field in Salesforce. I must have not entered the formula properly. Need help
Apex Test not updating parent object field based on child object formula fieldsSalesForce Report, to return contacts who have attended 3+ CampaignsFormula field in Campaign Member SectionHow to assign new object to a queue using Process Builder, without using the queue ID?Formula field not calculating properly with nullNeed Help with Formula(Currency)Report Filter Question: Display all records inserted after certain time from datetime fieldCheckbox formula returning #Error when True, correct False value when FalseCompare email to a listProcess Builder formula only partially evaluates(Edited version after trying with one of the proposed solutions)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
For the purpose of having a prospect list as a report, I would like to show up in the report only leads/contacts in a campaign member list owned by the logged in User AND the leads owned by a queue. So I created a formula field as a checkbox and added it to the report as a filter. Here the formula:
AND( Lead.Owner:Queue.Id="3D00G50000002l3Sw",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
formula
add a comment |
For the purpose of having a prospect list as a report, I would like to show up in the report only leads/contacts in a campaign member list owned by the logged in User AND the leads owned by a queue. So I created a formula field as a checkbox and added it to the report as a filter. Here the formula:
AND( Lead.Owner:Queue.Id="3D00G50000002l3Sw",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
formula
Is the formula saving? If so, how does its output differ from what you're expecting?
– Thomas Taylor
8 hours ago
formula is saving but output is null. I am making it as a dynamic report
– DRose
8 hours ago
formula is saving but output is null. I am making it as a dynamic report. Condition for OR I am the lead owner, show me the lead in the report OR I am the contact owner, show me the contact in the report, OR I am the account owner, but not the contact owner, still show me the contact in the report AND No matter what is true above show me all leads owned by X queue So as a result I should have at least in my report the leads owned by the queue
– DRose
7 hours ago
add a comment |
For the purpose of having a prospect list as a report, I would like to show up in the report only leads/contacts in a campaign member list owned by the logged in User AND the leads owned by a queue. So I created a formula field as a checkbox and added it to the report as a filter. Here the formula:
AND( Lead.Owner:Queue.Id="3D00G50000002l3Sw",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
formula
For the purpose of having a prospect list as a report, I would like to show up in the report only leads/contacts in a campaign member list owned by the logged in User AND the leads owned by a queue. So I created a formula field as a checkbox and added it to the report as a filter. Here the formula:
AND( Lead.Owner:Queue.Id="3D00G50000002l3Sw",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
formula
formula
edited 8 hours ago
Bartosz Śliwiński
6062 silver badges12 bronze badges
6062 silver badges12 bronze badges
asked 8 hours ago
DRoseDRose
153 bronze badges
153 bronze badges
Is the formula saving? If so, how does its output differ from what you're expecting?
– Thomas Taylor
8 hours ago
formula is saving but output is null. I am making it as a dynamic report
– DRose
8 hours ago
formula is saving but output is null. I am making it as a dynamic report. Condition for OR I am the lead owner, show me the lead in the report OR I am the contact owner, show me the contact in the report, OR I am the account owner, but not the contact owner, still show me the contact in the report AND No matter what is true above show me all leads owned by X queue So as a result I should have at least in my report the leads owned by the queue
– DRose
7 hours ago
add a comment |
Is the formula saving? If so, how does its output differ from what you're expecting?
– Thomas Taylor
8 hours ago
formula is saving but output is null. I am making it as a dynamic report
– DRose
8 hours ago
formula is saving but output is null. I am making it as a dynamic report. Condition for OR I am the lead owner, show me the lead in the report OR I am the contact owner, show me the contact in the report, OR I am the account owner, but not the contact owner, still show me the contact in the report AND No matter what is true above show me all leads owned by X queue So as a result I should have at least in my report the leads owned by the queue
– DRose
7 hours ago
Is the formula saving? If so, how does its output differ from what you're expecting?
– Thomas Taylor
8 hours ago
Is the formula saving? If so, how does its output differ from what you're expecting?
– Thomas Taylor
8 hours ago
formula is saving but output is null. I am making it as a dynamic report
– DRose
8 hours ago
formula is saving but output is null. I am making it as a dynamic report
– DRose
8 hours ago
formula is saving but output is null. I am making it as a dynamic report. Condition for OR I am the lead owner, show me the lead in the report OR I am the contact owner, show me the contact in the report, OR I am the account owner, but not the contact owner, still show me the contact in the report AND No matter what is true above show me all leads owned by X queue So as a result I should have at least in my report the leads owned by the queue
– DRose
7 hours ago
formula is saving but output is null. I am making it as a dynamic report. Condition for OR I am the lead owner, show me the lead in the report OR I am the contact owner, show me the contact in the report, OR I am the account owner, but not the contact owner, still show me the contact in the report AND No matter what is true above show me all leads owned by X queue So as a result I should have at least in my report the leads owned by the queue
– DRose
7 hours ago
add a comment |
2 Answers
2
active
oldest
votes
Bartosz's advice about using the the Queue Developer Name is good, but there are a couple other issues here. (Incidentally, the problem with your Queue Id is that it has "3D" at the front, probably from copying it out of an encoded URL. "00G50000002l3Sw" is probably the Queue Id you're looking for, but, use the developer name.)
First, and most important, is that you are using AND()
, which means that all of the conditions listed have to be TRUE
for the checkbox to be TRUE
. It's not possible for a Lead to be owned both by a queue and the current user, so your formula as written will always be FALSE
. You want any one of the conditions to make the checkbox formula TRUE
, so you need to use OR()
.
Another point, not really an error, is that checks for equality are inherently TRUE
or FALSE
; you don't need to wrap them in an IF()
to determine that.
So, that gets us to:
OR(Lead.Owner:Queue.DeveloperName = "QueueDevName",
$User.Id=Contact.OwnerId,
$User.Id=Lead.Owner:User.Id,
$User.Id=Contact.Account.OwnerId)
Thanks for the help.
– DRose
7 hours ago
1
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
add a comment |
First of all 3D00G50000002l3Sw
is definetely not a Queue's Id, so probably that's where you are having issues. Also: as a general rule, try not to use hardcoded Ids anywhere in Salesforce because they may change (e.g. during deployment to another environment). Instead use DeveloperName or similar field. Try using this formula:
AND( Lead.Owner:Queue.DeveloperName="Developer_Name_Of_Your_Queue",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
And change Developer_Name_Of_Your_Queue
to whatever your Queue's Developer Name is.
thanks for the help
– DRose
7 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f271252%2fneed-help-with-the-formula-field-in-salesforce-i-must-have-not-entered-the-form%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Bartosz's advice about using the the Queue Developer Name is good, but there are a couple other issues here. (Incidentally, the problem with your Queue Id is that it has "3D" at the front, probably from copying it out of an encoded URL. "00G50000002l3Sw" is probably the Queue Id you're looking for, but, use the developer name.)
First, and most important, is that you are using AND()
, which means that all of the conditions listed have to be TRUE
for the checkbox to be TRUE
. It's not possible for a Lead to be owned both by a queue and the current user, so your formula as written will always be FALSE
. You want any one of the conditions to make the checkbox formula TRUE
, so you need to use OR()
.
Another point, not really an error, is that checks for equality are inherently TRUE
or FALSE
; you don't need to wrap them in an IF()
to determine that.
So, that gets us to:
OR(Lead.Owner:Queue.DeveloperName = "QueueDevName",
$User.Id=Contact.OwnerId,
$User.Id=Lead.Owner:User.Id,
$User.Id=Contact.Account.OwnerId)
Thanks for the help.
– DRose
7 hours ago
1
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
add a comment |
Bartosz's advice about using the the Queue Developer Name is good, but there are a couple other issues here. (Incidentally, the problem with your Queue Id is that it has "3D" at the front, probably from copying it out of an encoded URL. "00G50000002l3Sw" is probably the Queue Id you're looking for, but, use the developer name.)
First, and most important, is that you are using AND()
, which means that all of the conditions listed have to be TRUE
for the checkbox to be TRUE
. It's not possible for a Lead to be owned both by a queue and the current user, so your formula as written will always be FALSE
. You want any one of the conditions to make the checkbox formula TRUE
, so you need to use OR()
.
Another point, not really an error, is that checks for equality are inherently TRUE
or FALSE
; you don't need to wrap them in an IF()
to determine that.
So, that gets us to:
OR(Lead.Owner:Queue.DeveloperName = "QueueDevName",
$User.Id=Contact.OwnerId,
$User.Id=Lead.Owner:User.Id,
$User.Id=Contact.Account.OwnerId)
Thanks for the help.
– DRose
7 hours ago
1
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
add a comment |
Bartosz's advice about using the the Queue Developer Name is good, but there are a couple other issues here. (Incidentally, the problem with your Queue Id is that it has "3D" at the front, probably from copying it out of an encoded URL. "00G50000002l3Sw" is probably the Queue Id you're looking for, but, use the developer name.)
First, and most important, is that you are using AND()
, which means that all of the conditions listed have to be TRUE
for the checkbox to be TRUE
. It's not possible for a Lead to be owned both by a queue and the current user, so your formula as written will always be FALSE
. You want any one of the conditions to make the checkbox formula TRUE
, so you need to use OR()
.
Another point, not really an error, is that checks for equality are inherently TRUE
or FALSE
; you don't need to wrap them in an IF()
to determine that.
So, that gets us to:
OR(Lead.Owner:Queue.DeveloperName = "QueueDevName",
$User.Id=Contact.OwnerId,
$User.Id=Lead.Owner:User.Id,
$User.Id=Contact.Account.OwnerId)
Bartosz's advice about using the the Queue Developer Name is good, but there are a couple other issues here. (Incidentally, the problem with your Queue Id is that it has "3D" at the front, probably from copying it out of an encoded URL. "00G50000002l3Sw" is probably the Queue Id you're looking for, but, use the developer name.)
First, and most important, is that you are using AND()
, which means that all of the conditions listed have to be TRUE
for the checkbox to be TRUE
. It's not possible for a Lead to be owned both by a queue and the current user, so your formula as written will always be FALSE
. You want any one of the conditions to make the checkbox formula TRUE
, so you need to use OR()
.
Another point, not really an error, is that checks for equality are inherently TRUE
or FALSE
; you don't need to wrap them in an IF()
to determine that.
So, that gets us to:
OR(Lead.Owner:Queue.DeveloperName = "QueueDevName",
$User.Id=Contact.OwnerId,
$User.Id=Lead.Owner:User.Id,
$User.Id=Contact.Account.OwnerId)
answered 7 hours ago
Thomas TaylorThomas Taylor
3,46114 silver badges35 bronze badges
3,46114 silver badges35 bronze badges
Thanks for the help.
– DRose
7 hours ago
1
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
add a comment |
Thanks for the help.
– DRose
7 hours ago
1
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
Thanks for the help.
– DRose
7 hours ago
Thanks for the help.
– DRose
7 hours ago
1
1
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
Personally, I avoid use of those horridly confusing AND and OR functions and stick with something like "Lead.Owner:Queue.DeveloperName = "QueueDevName" || $User.Id=Contact.OwnerId || $User.Id=Lead.Owner:User.Id || $User.Id=Contact.Account.OwnerId", but then I'm a programmer rather than business analyst :D
– Phil W
7 hours ago
add a comment |
First of all 3D00G50000002l3Sw
is definetely not a Queue's Id, so probably that's where you are having issues. Also: as a general rule, try not to use hardcoded Ids anywhere in Salesforce because they may change (e.g. during deployment to another environment). Instead use DeveloperName or similar field. Try using this formula:
AND( Lead.Owner:Queue.DeveloperName="Developer_Name_Of_Your_Queue",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
And change Developer_Name_Of_Your_Queue
to whatever your Queue's Developer Name is.
thanks for the help
– DRose
7 hours ago
add a comment |
First of all 3D00G50000002l3Sw
is definetely not a Queue's Id, so probably that's where you are having issues. Also: as a general rule, try not to use hardcoded Ids anywhere in Salesforce because they may change (e.g. during deployment to another environment). Instead use DeveloperName or similar field. Try using this formula:
AND( Lead.Owner:Queue.DeveloperName="Developer_Name_Of_Your_Queue",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
And change Developer_Name_Of_Your_Queue
to whatever your Queue's Developer Name is.
thanks for the help
– DRose
7 hours ago
add a comment |
First of all 3D00G50000002l3Sw
is definetely not a Queue's Id, so probably that's where you are having issues. Also: as a general rule, try not to use hardcoded Ids anywhere in Salesforce because they may change (e.g. during deployment to another environment). Instead use DeveloperName or similar field. Try using this formula:
AND( Lead.Owner:Queue.DeveloperName="Developer_Name_Of_Your_Queue",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
And change Developer_Name_Of_Your_Queue
to whatever your Queue's Developer Name is.
First of all 3D00G50000002l3Sw
is definetely not a Queue's Id, so probably that's where you are having issues. Also: as a general rule, try not to use hardcoded Ids anywhere in Salesforce because they may change (e.g. during deployment to another environment). Instead use DeveloperName or similar field. Try using this formula:
AND( Lead.Owner:Queue.DeveloperName="Developer_Name_Of_Your_Queue",
IF($User.Id=Contact.OwnerId, TRUE,
IF($User.Id=Lead.Owner:User.Id, TRUE,
IF($User.Id=Contact.Account.OwnerId, TRUE,
FALSE
))))
And change Developer_Name_Of_Your_Queue
to whatever your Queue's Developer Name is.
answered 8 hours ago
Bartosz ŚliwińskiBartosz Śliwiński
6062 silver badges12 bronze badges
6062 silver badges12 bronze badges
thanks for the help
– DRose
7 hours ago
add a comment |
thanks for the help
– DRose
7 hours ago
thanks for the help
– DRose
7 hours ago
thanks for the help
– DRose
7 hours ago
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f271252%2fneed-help-with-the-formula-field-in-salesforce-i-must-have-not-entered-the-form%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is the formula saving? If so, how does its output differ from what you're expecting?
– Thomas Taylor
8 hours ago
formula is saving but output is null. I am making it as a dynamic report
– DRose
8 hours ago
formula is saving but output is null. I am making it as a dynamic report. Condition for OR I am the lead owner, show me the lead in the report OR I am the contact owner, show me the contact in the report, OR I am the account owner, but not the contact owner, still show me the contact in the report AND No matter what is true above show me all leads owned by X queue So as a result I should have at least in my report the leads owned by the queue
– DRose
7 hours ago