• Spencer Bartz
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
The trailhead tutorial  (https://trailhead.salesforce.com/en/content/learn/modules/nonprofit_volunteer_website/nonprofit_volunteer_website_get_started) has too much irrelevant information and, based on its language, probably predates the SFDX CLI.

Is there an updated tutorial for "How to make a Salesforce Site using SFDX CLI?" 
I'm a developer/Admin and I've inherited a half-built Salesforce Site which was a mess of files and need to find out how to pick that up using SFDX.

I am transitioning into a Salesforce Admin position and the previous Admin would like to have Critical Update Notification Emails disabled for only his account. Is there any way to achieve this in code or UI?

Thanks in advance!

I'm stumped as to why my emails aren't being delivered from my Sandbox when I use an Apex class.  Here is what I've checked:

(I have replaced the email from actual results with 'MY EMAIL 1' and 'MY EMAIL 2', so that's not bad email values in the code.)

1) Deliverability:  Set to All email

2) Bounce management:  Both checked and unchecked

3) Test Deliverability:  Recieved all 32 emails

4)  Single message:  I need to deliver a templated email with an attachment, but just to try and see if I can get anything to work, I've commented that out and just tried to send a single email.  I copy and pasted the code off the web in an effort to make sure I'm not overlooking anything.  Here it is, copy-and-pasted straight from my class (and then masked the email):

Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
    String[] sendingTo = new String[]{'MY EMAIL ADDRESS 1'};
    semail.setToAddresses(sendingTo);
    String[] sendingToBccAdd = new String[]{'MY EMAIL 2'};
    semail.setBccAddresses(sendingToBccAdd);
    String[] sendingTocAdd = new String[]{'MY EMAIL 1'};
    semail.setCcAddresses(sendingTocAdd);
    semail.setSubject('Single Email message Example');
    semail.setPlainTextBody('Hello!!!!!!!!!!This is a test email to test single email message program');
            
try {
    system.debug('Yapa - Sending a non-template email.');
    Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail});
    }
catch (exception e) {
        system.debug('Yapa - Tried to send a non-template email and got an error:  ' + e);
    }    

5)  Debug logs:  system.debug statements and try... catch

I've thrown in all sorts of debug entries.  You can see in the single message email I'm sending that I am logging both success and failure.  When I look at debug logs, the "try" statement succeeds and I can see the email in the logs.

6)  Email logs:  Nothing.  The Deliverability test shows up in the log, but none of the many, many email tests I've tried.

For testing, I've got a button on my Lead object that calls a class to send the email.  Like I said, I've got it debug logged the !*(& out of, and I've traced it working all the way to the email send in the 'try...catch', and it's working, with all the correct values, right up to the send which gives the appearance of having worked.  But the emails never show up.

Here's a sample from the log:

15:00:07.0 (68224890)|VARIABLE_SCOPE_BEGIN|[176]|semail|Messaging.SingleEmailMessage|true|false
15:00:07.0 (68286222)|VARIABLE_ASSIGNMENT|[176]|semail|"common.api.soap.wsdl.SingleEmailMessage@76bb46ad"|0xac78023
15:00:07.0 (68293666)|STATEMENT_EXECUTE|[177]
15:00:07.0 (68303142)|HEAP_ALLOCATE|[177]|Bytes:4
15:00:07.0 (68324170)|HEAP_ALLOCATE|[177]|Bytes:29
15:00:07.0 (68332788)|VARIABLE_SCOPE_BEGIN|[177]|sendingTo|List<String>|true|false
15:00:07.0 (68351056)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:00:07.0 (68360976)|VARIABLE_ASSIGNMENT|[177]|sendingTo|["MY EMAIL 1"]|0x344d1916
15:00:07.0 (68366779)|STATEMENT_EXECUTE|[178]
15:00:07.0 (68380256)|STATEMENT_EXECUTE|[179]
15:00:07.0 (68386333)|HEAP_ALLOCATE|[179]|Bytes:4
15:00:07.0 (68401241)|HEAP_ALLOCATE|[179]|Bytes:25
15:00:07.0 (68407362)|VARIABLE_SCOPE_BEGIN|[179]|sendingToBccAdd|List<String>|true|false
15:00:07.0 (68421543)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:00:07.0 (68429426)|VARIABLE_ASSIGNMENT|[179]|sendingToBccAdd|["MY EMAIL 1"]|0x2e1ff2aa
15:00:07.0 (68435010)|STATEMENT_EXECUTE|[180]
15:00:07.0 (68446165)|STATEMENT_EXECUTE|[181]
15:00:07.0 (68451784)|HEAP_ALLOCATE|[181]|Bytes:4
15:00:07.0 (68467537)|VARIABLE_SCOPE_BEGIN|[181]|sendingTocAdd|List<String>|true|false
15:00:07.0 (68480803)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:00:07.0 (68488466)|VARIABLE_ASSIGNMENT|[181]|sendingTocAdd|["MY EMAIL 1"]|0x5624acf0
15:00:07.0 (68493667)|STATEMENT_EXECUTE|[182]
15:00:07.0 (68511652)|STATEMENT_EXECUTE|[183]
15:00:07.0 (68515434)|HEAP_ALLOCATE|[183]|Bytes:28
15:00:07.0 (68534615)|STATEMENT_EXECUTE|[184]
15:00:07.0 (68537295)|HEAP_ALLOCATE|[184]|Bytes:72
15:00:07.0 (68549852)|STATEMENT_EXECUTE|[186]
15:00:07.0 (68551392)|STATEMENT_EXECUTE|[186]
15:00:07.0 (68552661)|STATEMENT_EXECUTE|[187]
15:00:07.0 (68554725)|HEAP_ALLOCATE|[187]|Bytes:36
15:00:07.0 (68571269)|USER_DEBUG|[187]|DEBUG|Yapa - Sending a non-template email.
15:00:07.0 (68578657)|STATEMENT_EXECUTE|[188]
15:00:07.0 (68599370)|HEAP_ALLOCATE|[188]|Bytes:4
15:00:07.0 (68652773)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:00:07.0 (68674221)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:00:07.0 (111182217)|EMAIL_QUEUE|[188]|subject: Single Email message Example, bccSender: false, saveAsActivity: true, useSignature: true, toAddresses: [MY EMAIL 1], ccAddresses: [MY EMAIL 1], bccAddresses: [MY EMAIL 2], plainTextBody: Hello!!!!!!!!!!This is a test email to test single email message program, 
15:00:07.0 (111271089)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:00:07.0 (111306604)|METHOD_EXIT|[63]|01p0U00000058Uf|sendEmailWithAttachment.sendEmailWithPDFAttachment(Id, String)
15:00:07.0 (111320211)|STATEMENT_EXECUTE|[65]
15:00:07.0 (111326767)|HEAP_ALLOCATE|[65]|Bytes:1
15:00:07.0 (111398051)|HEAP_ALLOCATE|[65]|Bytes:18
15:00:07.0 (111413617)|HEAP_ALLOCATE|[65]|Bytes:19


7)  I don't see any of them in my Junk email box for either email address.

8)  If I send an email directly from the UI for a Lead (i.e. not via code), it successfully reaches the email address.

Any ideas what's going wrong?

SImple VF page it's work perfect.


<apex:page >
    <apex:includeScript value="{!URLFOR($Resource.Xsolla_Jquery_min, '')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Xsolla_Jquery_custom_min, '')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Xsolla_Jquery_timepicker, '')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.Xsolla_Jquery_css, '')}"/> 
 
    <script language="javascript">
           $(function() { 
                            $('#datepicker').datetimepicker({
                                showSecond: true,
                                timeFormat: 'hh:mm:ss',
                                stepHour: 2,
                                stepMinute: 10,
                                stepSecond: 10
                            });
                        }); 
    </script>
      
    <input type="text" name="date" id="datepicker" value="01.06.2009 00:00"/> 
 
</apex:page>

But in on the page tabPanel, 

 

3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript:265Uncaught TypeError: Object [object Object] has no method 'dispatchEvent'
3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript:106Uncaught TypeError: Object [object Object] has no method 'hasClassName'
3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript:106Uncaught TypeError: Cannot read property 'length' of undefined
3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript:107Uncaught TypeError: Cannot call method 'replace' of undefined

I'am add to code, this fix error, but calendar not show

<script type="text/javascript">

         jQuery.noConflict();

</script> 

 

How to fix this problem?