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

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 14
    Replies
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}