• Daniel Roberts
  • NEWBIE
  • 50 Points
  • Member since 2018
  • Salesforce Admin

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 10
    Replies
Hey Guys, we have several certificates for our Salesforce Sites. I would like to create a Scheduled APEX class that runs once a day to check for approaching expiration dates. Is this possible to do? My main issue is that I'm not sure how to access the Certificate Records that have the expiration dates on them. 

Let me know, thanks. 
Hey everyone, if you can show me what I'm doing wrong I would appreciate. I can't create Account records if the "Name='Account with Spaces'" in it. Even have two samples, one that works and another that doesn't. One of the examples is straight from the SFDX documentation (2). 

Sample 1 (Works); 
Drobe@MSI MINGW64 ~/OneDrive/Desktop/Projects/Salesforce/APEX Super Badge
$ sfdx force:data:record:create -s Account -v "Name=UniversalContainers" -u MyDevOrg
Successfully created record

Sample 2 With Spaces (Fails) This one is an example from the sfdx force:data:record:create --help command. 
 
Drobe@MSI MINGW64 ~/OneDrive/Desktop/Projects/Salesforce/APEX Super Badge
$ sfdx force:data:record:create -s Account -v "Name='Universal Containers'" -u MyDevOrg
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

 
$ sfdx force:apex:execute -u ApexDevHub -f force-app/main/default/triggers/HelloWorldTrigger.trigger
ERROR:  Compilation failed.
 !    ERROR: Line: 1, Column: 1
 !    Unexpected token 'trigger'.
ERROR:  Execution failed.

Hey guys  trying to get into SFDX, but testing a trigger is a bit of a challenge. 

Here is the code that I'm running and the error that I'm getting. I think it might be related to my Java version not accessing the APEX language server. Any help would be great. Thanks, 

 
Hey everyone, we are looking to connect Salesforce to Shopify, and have Shopify write the orders to Salesforce via WebHooks. I've been asked the developer we are working with to set up a Salesforce Site for the Shopify App to write to our Salesforce org, but it seems like the better route to go is the Salesforce Connected App. The integrations is going to utilize Shopify WebHooks and on Order Creation write an opportunity to Salesforce. Would you guys use Salesforce Sites for this or would you use Salesforce Connected Apps? 

 
Hey guys trying to get comfortable with the Salesforce CLI, and went to deploy my code changes to my Dev Org but I keep getting the following error message. I checked out the link that they listed, but couldn't seem to figure out what issue was. I modified the JSON with the folder name that I'm trying to deploy, but still had no luck. 
 
Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json file. Add this location to your "packageDirectories" value, or deploy or retrieve a different file or directory. For details about sfdx-project.json, see: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm

 
Hey guys, I'm running sfdx force:mdapi:convert -r mdapipkg -d force-app. It's not converting the file "package.xml" 

I have a screenshot here, and I'm not sure what I need to to do with my file path to get the convert to work. The Salesforce CLI just keeps saying that the folder doesn't have the package.xml file when it is clearly the only file in the folder. THanks for your help. 
package.xml file location
<apex:page standardController="Contact" recordSetVar="contacts"  lightningStylesheets="true">
    <apex:pageBlock title="Contacts List">

        <!-- Contacts List -->
        <apex:pageBlockTable cellpadding="1000px" value="{! contacts }" var="ct">
            <apex:column value="{! ct.FirstName }"/>
            <apex:column value="{! ct.LastName }"/>
            <apex:column value="{! ct.Email }"/>
            <apex:column value="{! ct.Account.Name }"/>
        </apex:pageBlockTable>
        
    </apex:pageBlock>
</apex:page>

Hey everyone, trying to get a handle on VF pages, but having some trouble with the attribute cellpadding. My understanding is that it takes either px or % values, and should effect the internal padding of the cells, i.e. the cells should get bigger the larger the number. 

Here is my code. Can anyone help me understand why there is no change in the cell's size? 

 
I am currently working through the "Getting Started with APEX Unit", and the tutorial mentions an "Apex Class Library" where the descriptions of the Salesforce: 
"The EmailManager class has a public method (sendMail()) that sends email and uses built-in Messaging methods of the Apex class library. Also, this class has a private helper method (inspectResults()), which can’t be called externally because it is private but is used only within the class. This helper method inspects the results of the email send call and is called by sendMail()."

I'm wondering where you can find a description of some of these and other methods. i.e. SendMail(), InspectResults(), etc. Any help would be great. 
Hey everyone, trying to get my APEX skills up. Can't seem to figure out how to debug this error. Any advice? 

Thanks, 
 
public class ContactSearch{
    public static Contact searchForContacts(String lastName, String zip){
        List<Contact> conts =[SELECT Id, Name FROM Contact WHERE LastName=:lastName AND MailingPostalCode=:zip ]; 
        
        return  conts;
    }
	
}

 
Greetings! 

I'm trying to run a query on PricebookEntry Ids that are in the Standard Pricebook. I'm close, but the PricebookEntry is returning an Object Notation along with Unit Price. 

SELECT Id, Description, IsActive, Name,  (SELECT Id FROM PricebookEntries WHERE Pricebook2Id = '001sx15498795xfw) FROM Product2

Result = [{"Id":"01x79845261xgwAAQ"}]


I'm trying to get the value by itself; i.e. not as an array or object. Any ideas? 


 
Greetings Salsforce Developers! 
I have been tasked to find the triggers and processes that could possibly be affecting a boolean field that was added as a custom field by our previous SF admin. I'm trying to find the automated processes/apex triggers that are impacting or fired by the fields true/false state. Is there a way to get a list of processes for the field, rather than having to dig through the whole list of apex triggers and processes? 

Thanks, 
I can't get the Workbench to create accounts. 
All I am doing is copying code, so I'm not sure where it went wrong. I'm suspecting my object creation is not correct. 
When I attempt to complete the challenge right before this one (title: ​Use DML to Persist sObjects to the Database) I get the following error: 
 
EXCEPTION: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long.: []
STACKTRACE: AnonymousBlock: line 8, column 1
LINE: 8 COLUMN: 1

The code I i'm using in Workbench to create the Recruiting Account: 
 
//Instantiate an object called acct from the sObject Account class
Account acct = new Account();
    
//Set the attribute name of the acct object to Recruiting
acct.name='Recruiting';
    
//Persist the acct object to the DB using DML
Database.insert(acct);
Any help? 

Thanks, 
 
Hey everyone, read some of the threads on here, but can't seem to get my Git to complete the tasks. Any one find a post that solved this error for them? 'C:\Program' is not recognized as an internal or external command, operable program or batch file.

Thanks. 
Here is the order of commands that I am running. 
$ sfdx
Usage: sfdx COMMAND

Help topics, type sfdx help TOPIC for more details:

 force    tools for the Salesforce developer
 plugins  create a new sfdx-cli plugin
 update   update the sfdx CLI


$ cat config/project-scratch-def.json
{
    "orgName": "Salesforce DX Company",
    "edition": "Developer",
    "orgPreferences" : {
        "enabled": ["S1DesktopEnabled"]
    }
}

$ sfdx force:org:create -s -f config/project-scratch-def.json -a "default scratch org"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Thanks in advance.  
Hey guys trying to get comfortable with the Salesforce CLI, and went to deploy my code changes to my Dev Org but I keep getting the following error message. I checked out the link that they listed, but couldn't seem to figure out what issue was. I modified the JSON with the folder name that I'm trying to deploy, but still had no luck. 
 
Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json file. Add this location to your "packageDirectories" value, or deploy or retrieve a different file or directory. For details about sfdx-project.json, see: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm

 
$ sfdx force:apex:execute -u ApexDevHub -f force-app/main/default/triggers/HelloWorldTrigger.trigger
ERROR:  Compilation failed.
 !    ERROR: Line: 1, Column: 1
 !    Unexpected token 'trigger'.
ERROR:  Execution failed.

Hey guys  trying to get into SFDX, but testing a trigger is a bit of a challenge. 

Here is the code that I'm running and the error that I'm getting. I think it might be related to my Java version not accessing the APEX language server. Any help would be great. Thanks, 

 
<apex:page standardController="Contact" recordSetVar="contacts"  lightningStylesheets="true">
    <apex:pageBlock title="Contacts List">

        <!-- Contacts List -->
        <apex:pageBlockTable cellpadding="1000px" value="{! contacts }" var="ct">
            <apex:column value="{! ct.FirstName }"/>
            <apex:column value="{! ct.LastName }"/>
            <apex:column value="{! ct.Email }"/>
            <apex:column value="{! ct.Account.Name }"/>
        </apex:pageBlockTable>
        
    </apex:pageBlock>
</apex:page>

Hey everyone, trying to get a handle on VF pages, but having some trouble with the attribute cellpadding. My understanding is that it takes either px or % values, and should effect the internal padding of the cells, i.e. the cells should get bigger the larger the number. 

Here is my code. Can anyone help me understand why there is no change in the cell's size? 

 
Hey everyone, trying to get my APEX skills up. Can't seem to figure out how to debug this error. Any advice? 

Thanks, 
 
public class ContactSearch{
    public static Contact searchForContacts(String lastName, String zip){
        List<Contact> conts =[SELECT Id, Name FROM Contact WHERE LastName=:lastName AND MailingPostalCode=:zip ]; 
        
        return  conts;
    }
	
}

 
I can't get the Workbench to create accounts. 
All I am doing is copying code, so I'm not sure where it went wrong. I'm suspecting my object creation is not correct. 
When I attempt to complete the challenge right before this one (title: ​Use DML to Persist sObjects to the Database) I get the following error: 
 
EXCEPTION: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long.: []
STACKTRACE: AnonymousBlock: line 8, column 1
LINE: 8 COLUMN: 1

The code I i'm using in Workbench to create the Recruiting Account: 
 
//Instantiate an object called acct from the sObject Account class
Account acct = new Account();
    
//Set the attribute name of the acct object to Recruiting
acct.name='Recruiting';
    
//Persist the acct object to the DB using DML
Database.insert(acct);
Any help? 

Thanks, 
 
Hello,
I am not able to convert the Metadata API Source after unzip the retrived source form Dev Hub

here is command 
sfdx force:mdapi:convert -r  /source directory 
I'm struggling with the custom lightning component on this part. I don't have much background coding and am having trouble finding resources to help me achieve coding the lightning component. If someone could help give me some framework code to create a custom lightning component to hold a URL or direct me to a resource that help break this down I'd be very appreciative.
 
Hi,

I am getting following error while importing data for Contact Hobby.

Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.:Name --"

My CSV file.CSV file

Mapping
I'm getting the error "The outputLink component is not binding to the ID of a case" for this challenge. I've checked several threads on here and I'm almost certain it should be correct. It does link to the details page for the case. 

I initially just had the ID linking but have changed it so both case number and id link via id in case that mattered. 

I've also previously tried having a complete url as the value but no luck. 

Any help would be appreciated.

<apex:page controller="NewCaseListController">
 
        <apex:pageBlock title="New Case List" id="cases_list">
            
    <apex:repeat value="{! newcases }" var="cases">
       
        <apex:outputLink value="/{! cases.id}">
        ID:  {! cases.id }
        </apex:outputLink><br/>
        <apex:outputLink value="/{! cases.id}">
        Case Number:  {! cases.CaseNumber }
        </apex:outputLink><br/>    
    
    </apex:repeat>
            
        </apex:pageBlock>
Project custom object records should only be seen by the owner of the record and users above the owner on the role hierarchy. However, for some Project records, the Training Coordinator must also have Read Only visibility to the Project record.

Create a custom picklist field on the Project object called “Priority” with the following values: High, Medium, and Low. Then create a criteria-based Sharing Rule for Project records where the Priority = High to share those records with the Training Coordinator role.