• Jennifer.Schnell
  • NEWBIE
  • 90 Points
  • Member since 2015
  • Salesforce Administrator
  • SaaS Company

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 14
    Replies
We have a custom formula field with the code below and I need to add additional requrement - everything evaluates as is but also if it meets the criteria of the one line of code below  the field value should be 'Project'.

I have been trying to add the below line of code (which I think is correct)  to the existing formula (2nd code), but not getting the results I am expecting.  Does this line of code need to be a seperate part of the formula all together with the value 'Project' ?
(Data1_Services2__c = TRUE) && Owner.UserRole.Name <> "DGA"


 
IF( 
OR( 
AND(ISPICKVAL( ABC_Software_Type__c , 'Term License'), ABC_License_of_Years__c >=12), 
AND(ISPICKVAL( DEF_License_Type__c , 'Term License'), DEF_License__c >=12), 
AND(ISPICKVAL( HIJ_License_Type__c , 'Term License'), HIJ_License_of_Years__c >=12), 
AND(ISPICKVAL( KLM_License_Type__c , 'Term License'), KLM_Term__c >=12), 
AND(ISPICKVAL( OPQ_License_Type__c , 'Term License'), OPQ_License_of_Years__c >=12), 
AND(ISPICKVAL( RST_License_Type__c , 'Term License'), RST_Term__c >=12), 
AND(ISPICKVAL( UVW_License_Type__c , 'Term License'), UVW_License_of_Years__c >=12), 
AND(ISPICKVAL( XYZ_License_Type__c , 'Term License'), XYZ_Term__c >=12), 
AND(Data1_Services1__c = TRUE) 
), 
'Term', 
IF( 
AND( 
OR(ISPICKVAL(ABC_Software_Type__c,""),ISPICKVAL(ABC_Software_Type__c,"--None--")), 
OR(ISPICKVAL(DEF_License_Type__c,""),ISPICKVAL(DEF_License_Type__c,"--None--")), 
OR(ISPICKVAL(HIJ_License_Type__c,""),ISPICKVAL(HIJ_License_Type__c,"--None--")), 
OR(ISPICKVAL(KLM_License_Type__c,""),ISPICKVAL(KLM_License_Type__c,"--None--")), 
OR(ISPICKVAL(OPQ_License_Type__c,""),ISPICKVAL(OPQ_License_Type__c,"--None--")), 
OR(ISPICKVAL(RST_License_Type__c,""),ISPICKVAL(RST_License_Type__c,"--None--")), 
OR(ISPICKVAL(UVW_License_Type__c,""),ISPICKVAL(UVW_License_Type__c,"--None--")), 
OR(ISPICKVAL(XYZ_License_Type__c,""),ISPICKVAL(XYZ_License_Type__c,"--None--")) 
), 
'NA', 
'Project' 
) 
)

 
I am receiving a syntax error for this formula I am building for a node in a PB, I have reviewed this many times and I don't see where I am missing a = sign.  The basic logic is - IF record ISNEW or ISCHANGED AND "Industry" = "This" AND "Country" = "THIS.  I am a little dyslexic and formulas are my weak spot, I tend to get the syntax backwards.

Error: Syntax error. Missing '='
OR (
	AND ( ISNEW (),
	OR (
        TEXT ( [Account].Industry ) = "Chemicals",
        TEXT ( [Account].Industry ) = "Life Sciences",
        TEXT ( [Account].Industry ) = "Automotive",
        )
    AND (
         TEXT ( [Account].Country__c ) = "Germany",
         TEXT ( [Account].Country__c ) = "Austria",
         TEXT ( [Account].Country__c ) = "Switzerland",
         TEXT ( [Account].Country__c ) = "Luxembourg",
         TEXT ( [Account].Country__c ) = "Liechtenstein")
         ),
		
	OR (
    ISCHANGED ( [Account].Owner.id ),
	    AND  ( [Account].Owner.Id ) = "0050f000009WCRoAAO",
        TEXT ( [Account].Country__c ) = "Germany",
        TEXT ( [Account].Country__c ) = "Austria",
        TEXT ( [Account].Country__c ) = "Switzerland",
        TEXT ( [Account].Country__c ) = "Luxembourg",
        TEXT ( [Account].Country__c ) = "Liechtenstein")
    )

 
Our org has experienced rapid growth and has evolved from a 25 user org to a 350 user org, , we went from one admin to four and need to basically take inventory of what processes we have active, not using, can be deleted, etc.  I have been tasked to document all of our processes such as flows and batched jobs. Is there a way for me to query and export details on all our flows and batch jobs?

Does anyone have advice, templates or best practices to share?
I have a list of Accounts with IDs that just had an account owner change.  I need to find the ID's of all OPEN opportunities related (child) to that list of account ids and be able to expert both the account id and open opportunity id, Is this possible through the Developer Console or another tool?  I have Demand Tools also.
How do I query for the name of role and UserRole.Id for the org using Developer Console?
Need help writing a validation rule - TCV and ACV fields are REQUIRED for Stage = Solution Design, Proposal, Negotiate and Commit for two specific roles.  We have many validation rules on our opportunity object and want to make sure I am thinking of all the variables, plus my weak spots are validation and formulas.

I am trying to use the CASE Function, but I don't think I have it right.

AND((CASE(StageName ,
"Solution Design",1,
"Proposal",1,
"Negotiate",1,
"Commit",1,
0)
>
+1), $UserRole.Id <> "00eG0000001GdpN",
$UserRole.Id<>"00eG0000001Gil0", ISBLANK(TCV__c),ACV__c )
We have a requirement that Industry and AnnualRevenue fields are not blank on lead conversion.  I am creating a custom javascript button for this so it warns the user before they get to the default convert page, however I am running into an issue because the industry field is a picklist.  Is this still possible?

Here is the javascript I have:  https://gist.github.com/JennSchnell/999b40a95c79d6365375965ac283e673
I am receiving an apex test error - the error message is:
System.QueryException: List has no rows for assignment to SObject
Stack Trace: Class.BillingScheduleTest.TestBillingSchedule2: line 108, column 1

When I view the code in the developer console - line 108 code is the below:
        Asset objAS = [Select Id,Contract__c,Name  From Asset Where Name= 'TestAsset' Limit 1];

Still learning a lot of this stuff, but is the error telling me that I don't have an Asset with the name "TestAsset"?

Thanks.
We have a button "Send to Pardot" with a visualforce page behind it that is suppose to send a salesforce record to Pardot, however I am now getting the below error when using it.  I understand this is a Managed Package, but wanted to see if there is anything I can do on my end.

ERROR MESSAGE:
Visualforce Error
pi.PardotApiException: Request failed with Pardot API 
An unexpected error has occurred. Your solution provider has been notified. (pi)

VISUALFORCE PAGE:
<apex:page controller="pi.SendToPardotController">
<script>
window.history.back();
</script>
</apex:page>

APEX CONTROLLER
/*
This file is generated and isn't the actual source code for this
managed global class.
This read-only file shows the class's global constructors,
methods, variables, and properties.
To enable code to compile, all methods return null.
*/
global class SendToPardotController extends pi.PardotApiCalloutManager {
    webService static String sendToPardot(String sessionId, String serverUrl, String type, String id) {
        return null;
    }
    webService static String sendToPardotV2(String serverUrl, String type, String id) {
        return null;
    }
}

 
We have a field we had to replace "Customer_Origination_Date__c" with a new field.  Is there a way to query for that field to see what reports it is being used in?  I do not think it is possible to do a mass replace at all.
We recently switched over to My Domain and also had an instance refresh over the weekend.  I have one link on our home page that is not working, below is the code.  I see it is referring to "ServerInstance", where do I go to update this?  Thanks

window.open(getServerInstance() + "/apex/EditExpenseReportForward?retURL=%2Fa24%2Fo&save_new=1&sfdc.override=1");

function getServerInstance()
{
var url = window.location + "";
var urlParseArray = url.split(".");
var i;
var sInstance;
for(i=0; i< urlParseArray.length; i++) {
if (urlParseArray[i].indexOf("salesforce") != -1) {
sInstance = urlParseArray[i-1];
}
else if (urlParseArray[i].indexOf("force") != -1) {
sInstance = urlParseArray[i-2];
}
}
urlParseArray = sInstance.split("//");
sInstance = urlParseArray[0] + "//pse." + urlParseArray[1] + ".visual.force.com";
return sInstance;
}
I need assistance building a formula for a Task creation PB.  The formula is for an action "Assign to ID". 

This is on a contact record, right now "Assign to ID" is set to "BDR_Owner_c.  However this is causing flow errors when a user creates a new contact and the BDR_Owner_c" field is blank.  Looking to replace it with a formula -
If BDR_Owner_c is blank assign to Owner of Contact.
Process Builder Actions for Task Creation
I am using a formula field "Term" to find the number of MONTHS in a contract.  I want to return even partial months.
Examples:
Start Date: 3/15/2017
End Date:  3/31/2018
Result: 12.5

Start Date: 3/15/2017
End Date:  12/15/2017
Result:  9

What I have now is:
IF(
(Contract2_End_Date__c - Contract2_Start_Date__c) / 365 * 12 < 1, 1, (Contract2_End_Date__c - Contract2_Start_Date__c) / 365 * 12
)

How do I assure accuracey when there is leap year involved?
 
I have a user that cannot get into our org because he forgot his answer to his security question.  I researched online and see I can use the developer console and set my own password for him to can access and then he can change his security question/answer.  I am not too familar with the developer console or APEX code.  I am trying to use the below, but get an error "Unknown error parsing query"

SELECT System.setPassword (userID='005G00000085EnF','NEWPASSWORD')

Can anyone identify what I have wrong?  Thanks

 
I am trying to create a validation rule for the below:
1) Only certain profiles and Tom Smith may select the picklist value "Strategic" 
2) Once an account is designated as "Type = Strategic", only the above listed profiles/users may change it back to another value.

Below is what I have so far, looking for assistance on how to add a specific "user" to the below as well as #2 above.

AND(
ISPICKVAL( Type , "Strategic") ,

$Profile.Name <> "System Administrator Master",
$Profile.Name <> "Sales Administrator",
$Profile.Name <> "CSM System Administrator"
)
I created a custom button (URL) to sit on a related list in a contact record.  When you click that button it is suppose to create a new record in that related custom object and populate a field from a custom contact field.  Below is what I have but it isn't working.
 
/a78/e?01I19000000Criu={!Contact.Contact_Full_Name__c}
I have a list of Accounts with IDs that just had an account owner change.  I need to find the ID's of all OPEN opportunities related (child) to that list of account ids and be able to expert both the account id and open opportunity id, Is this possible through the Developer Console or another tool?  I have Demand Tools also.
How do I query for the name of role and UserRole.Id for the org using Developer Console?
Need help writing a validation rule - TCV and ACV fields are REQUIRED for Stage = Solution Design, Proposal, Negotiate and Commit for two specific roles.  We have many validation rules on our opportunity object and want to make sure I am thinking of all the variables, plus my weak spots are validation and formulas.

I am trying to use the CASE Function, but I don't think I have it right.

AND((CASE(StageName ,
"Solution Design",1,
"Proposal",1,
"Negotiate",1,
"Commit",1,
0)
>
+1), $UserRole.Id <> "00eG0000001GdpN",
$UserRole.Id<>"00eG0000001Gil0", ISBLANK(TCV__c),ACV__c )
We have a requirement that Industry and AnnualRevenue fields are not blank on lead conversion.  I am creating a custom javascript button for this so it warns the user before they get to the default convert page, however I am running into an issue because the industry field is a picklist.  Is this still possible?

Here is the javascript I have:  https://gist.github.com/JennSchnell/999b40a95c79d6365375965ac283e673
I am receiving an apex test error - the error message is:
System.QueryException: List has no rows for assignment to SObject
Stack Trace: Class.BillingScheduleTest.TestBillingSchedule2: line 108, column 1

When I view the code in the developer console - line 108 code is the below:
        Asset objAS = [Select Id,Contract__c,Name  From Asset Where Name= 'TestAsset' Limit 1];

Still learning a lot of this stuff, but is the error telling me that I don't have an Asset with the name "TestAsset"?

Thanks.
We recently switched over to My Domain and also had an instance refresh over the weekend.  I have one link on our home page that is not working, below is the code.  I see it is referring to "ServerInstance", where do I go to update this?  Thanks

window.open(getServerInstance() + "/apex/EditExpenseReportForward?retURL=%2Fa24%2Fo&save_new=1&sfdc.override=1");

function getServerInstance()
{
var url = window.location + "";
var urlParseArray = url.split(".");
var i;
var sInstance;
for(i=0; i< urlParseArray.length; i++) {
if (urlParseArray[i].indexOf("salesforce") != -1) {
sInstance = urlParseArray[i-1];
}
else if (urlParseArray[i].indexOf("force") != -1) {
sInstance = urlParseArray[i-2];
}
}
urlParseArray = sInstance.split("//");
sInstance = urlParseArray[0] + "//pse." + urlParseArray[1] + ".visual.force.com";
return sInstance;
}
I am trying to create a validation rule for the below:
1) Only certain profiles and Tom Smith may select the picklist value "Strategic" 
2) Once an account is designated as "Type = Strategic", only the above listed profiles/users may change it back to another value.

Below is what I have so far, looking for assistance on how to add a specific "user" to the below as well as #2 above.

AND(
ISPICKVAL( Type , "Strategic") ,

$Profile.Name <> "System Administrator Master",
$Profile.Name <> "Sales Administrator",
$Profile.Name <> "CSM System Administrator"
)
I created a custom button (URL) to sit on a related list in a contact record.  When you click that button it is suppose to create a new record in that related custom object and populate a field from a custom contact field.  Below is what I have but it isn't working.
 
/a78/e?01I19000000Criu={!Contact.Contact_Full_Name__c}