• Andrew Kulik
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 5
    Replies
I'm trying to send an email from Apex using the code below but when testing this in a scratch org no emails are being recieved. I have verfied the email adress of the test user I'm using and I can see the emails are in the email logs but nothing seems to get sent or recieved. 
 
public static void sendSingleEmailMethod(){

        Messaging.reserveSingleEmailCapacity(2);
        Messaging.SingleEmailMessage mymail = new Messaging.SingleEmailMessage();
        String[] toaddresses = new String[] {'xxxxxxxxxxxxx'}; 
        //String[] ccaddresses = new String[] {'xxxxxxxxxxx'};
        //String[] bccaddresses = new String[] {'user3@example.com’};
        
        mymail.setToAddresses(toAddresses);
        //mymail.setCcAddresses(ccAddresses);
        //mymail.setBccAddresses(bccAddresses);
        mymail.setReplyTo('support@example.com');
        mymail.setSenderDisplayName('Salesforce Support');
        mymail.setSubject('An email from Salesforce');
        mymail.setPlainTextBody('This email has been sent through Apex');
        mymail.setHtmlBody('<p> This email has been sent through Apex</p>');
        
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mymail });
    }

 
I'm investigating creating a custom Lighting app and need a Gantt chart compent. My Org already has service cloud but is it possible to configure multiple Gantt charts for different contexts? For example I might want one Gantt for managing engineers and another for managing training sessions.
It seems something has changed in Salesforce recently and now when debugging in the browser dev console or trying to use a console log to access a JS object or data everything is stuck in a proxy object. Does anyone know of how to get JS object out of the proxy object?

The below used to work but it doesn't work any more.

console.log(JSON.parse(JSON.stringify(obj)));
Can someone help me on how to convert/use this npm module within LWC? I need to be able to call the function in thi slibrary to wrap text.

https://www.npmjs.com/package/wordwrapjs#module_wordwrapjs--Wordwrap.wrap
Hi, I have a use case that I want to send out a mass email to users with the below requirments. What's the best way to acive this in Saleforce? I see marketing cloud might offer a way to do this?
  • The email should have a power point file attached
  • The email should have a button or link that the user has to click to say they have read the email. I want to store the users id in a customer object.
Hi, I am trying to get the refresh token for a connect App on a Trailhead playground. I am using the guide below but on the step "Obtaining tokens
Get Code" I am not getting redirected to a URL with a code at the end, instead it just logs me in and takes me to the settnigs page.

Are there any good instructions or guides for getting a refresh token?

https://medium.com/@bpmmendis94/obtain-access-refresh-tokens-from-salesforce-rest-api-a324fe4ccd9b
Hi I am trying to follwo this to create a lightning web component to save the users geolocation. The issue I am having is it seems you can import or save the latittude or longittude on the geolocation type. What's the best way to get round this?
We have an Angular app inside a VisualForce page and are trying to use "navigator.geolocation.getCurrentPosition". This is working ok in a scratch org but when I push the changes to a sandbox I get the error "Geolocation has been disabled in this document by feature policy".

I have a found the same question here https://salesforce.stackexchange.com/questions/207245/salesforce1-stopped-supporting-geolocation but there isn't an answer.
It seems something has changed in Salesforce recently and now when debugging in the browser dev console or trying to use a console log to access a JS object or data everything is stuck in a proxy object. Does anyone know of how to get JS object out of the proxy object?

The below used to work but it doesn't work any more.

console.log(JSON.parse(JSON.stringify(obj)));
Hi, I am trying to get the refresh token for a connect App on a Trailhead playground. I am using the guide below but on the step "Obtaining tokens
Get Code" I am not getting redirected to a URL with a code at the end, instead it just logs me in and takes me to the settnigs page.

Are there any good instructions or guides for getting a refresh token?

https://medium.com/@bpmmendis94/obtain-access-refresh-tokens-from-salesforce-rest-api-a324fe4ccd9b
Hi I am trying to follwo this to create a lightning web component to save the users geolocation. The issue I am having is it seems you can import or save the latittude or longittude on the geolocation type. What's the best way to get round this?
We have an Angular app inside a VisualForce page and are trying to use "navigator.geolocation.getCurrentPosition". This is working ok in a scratch org but when I push the changes to a sandbox I get the error "Geolocation has been disabled in this document by feature policy".

I have a found the same question here https://salesforce.stackexchange.com/questions/207245/salesforce1-stopped-supporting-geolocation but there isn't an answer.
Hello,

For this superbadge in the given entity relation diagram there is no connection that depicts the direct relation between Maintenance Request (case) and Equipment (Product). It is very confusing looking at the diagram given to understand this. Earlier in my solution to challenge 1 I assumed that there is no direct relation between the said objects and that I need to access the Equipment data by traversing the junction object (Work Part). Solution became much simpler when I swa that there is already a direct relation between Maintenance Request (case) and Equipment (Product).
Please look into this. Correct me I am wrong. Thank you.

 User-added image