• Jeffrey Ko
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 8
    Replies
Since Winter '18, Salesforce provided this new feature to automatically style existing VF pages to have the Lightning look-and-feel (https://releasenotes.docs.salesforce.com/en-us/winter18/release-notes/rn_vf_lightningstylesheets.htm).  I tried adding the "lightningStylesheets" attributes to a test VF page and it worked for me!

However, when I tested in on a mobile browser and Salesforce1 app, the VF page is still displayed in Classic UI.  :(

Anyone else have this issue and have a solution for it?  I guess this is still in Beta, but I thought it would work since the Release Notes say it will work for mobile too ...
I am currently working on an Apex trigger, such that when the Account Name is modified, it will send an email to a specific list of email addresses defined in a custom setting.  I am using the SingleEmailMessage API to do this, and the email uses a a plain-text email template.

I am facing 2 issues right, which I am hoping someone may know the answer to:
  • Whenever Person A changes the Account Name, it sends the email to person_b@test.ca (mailto:person_b@test.ca) and person_c@test.com (mailto:person_c@test.com).  However, everytime this happens, Person A will get copied in the email (in the email's CC) for some reason!!   Is there a way to turn this off somehow? 
  • We'd like the email to be sent from a specific person (instead of the actual user who made the update).  However, there is no way to set the sender in the SingleEmailMessage.  Is there another way to do this?  We are currently looking into doing an Email Service to achieve this, but was wondering if there is an easier way


Any help or suggestion will be appreciated.

Thanks,
Jeffrey
Hi everyone,

I am experiencing a strange issue with the Salesforce1.  Below is the background info:
  • On an Account page layout, added/embedded a Visualforce page
  • The VF page uses the standard controller; all it does is display a few values of custom fields from the account object (using CSS), to make that section more visually appealing  
  • On the VF page tag, we have the cache=false attribute
Everything works fine on the desktop browser version.  However, when using the Salesforce1 app, on occasion if I view an account #1, go back to do something else, see the account #2, then #3, etc ... after awhile, if I go to account #8, I would see the values from Account #2 in the embedded VF !!!  I would only see the old data from Account #2 within the VF component, and the rest of the page will show the correct Account data from account #8).  This behavior has been inconsistent and cannot be reproduced on demand.  But it will happen after several tries.  It seems that the VF page (which is within an IFRAME) is cached somehow?

Has anyone experienced something similar and can suggest a workaround?  We have reached out to Salesforce Support but no luck from that end yet .... 

We also tried to add a JavaScript code to the end of the VF file to refresh the page once onload, but that didn't seem to fix it ...

Thanks in advance!
 
Since Winter '18, Salesforce provided this new feature to automatically style existing VF pages to have the Lightning look-and-feel (https://releasenotes.docs.salesforce.com/en-us/winter18/release-notes/rn_vf_lightningstylesheets.htm).  I tried adding the "lightningStylesheets" attributes to a test VF page and it worked for me!

However, when I tested in on a mobile browser and Salesforce1 app, the VF page is still displayed in Classic UI.  :(

Anyone else have this issue and have a solution for it?  I guess this is still in Beta, but I thought it would work since the Release Notes say it will work for mobile too ...
I have a lightning component that implements lightning:actionOverride how do I get the recordId of the parent when the action is triggered from a related list?
I am currently working on an Apex trigger, such that when the Account Name is modified, it will send an email to a specific list of email addresses defined in a custom setting.  I am using the SingleEmailMessage API to do this, and the email uses a a plain-text email template.

I am facing 2 issues right, which I am hoping someone may know the answer to:
  • Whenever Person A changes the Account Name, it sends the email to person_b@test.ca (mailto:person_b@test.ca) and person_c@test.com (mailto:person_c@test.com).  However, everytime this happens, Person A will get copied in the email (in the email's CC) for some reason!!   Is there a way to turn this off somehow? 
  • We'd like the email to be sent from a specific person (instead of the actual user who made the update).  However, there is no way to set the sender in the SingleEmailMessage.  Is there another way to do this?  We are currently looking into doing an Email Service to achieve this, but was wondering if there is an easier way


Any help or suggestion will be appreciated.

Thanks,
Jeffrey
Hi everyone,

I am experiencing a strange issue with the Salesforce1.  Below is the background info:
  • On an Account page layout, added/embedded a Visualforce page
  • The VF page uses the standard controller; all it does is display a few values of custom fields from the account object (using CSS), to make that section more visually appealing  
  • On the VF page tag, we have the cache=false attribute
Everything works fine on the desktop browser version.  However, when using the Salesforce1 app, on occasion if I view an account #1, go back to do something else, see the account #2, then #3, etc ... after awhile, if I go to account #8, I would see the values from Account #2 in the embedded VF !!!  I would only see the old data from Account #2 within the VF component, and the rest of the page will show the correct Account data from account #8).  This behavior has been inconsistent and cannot be reproduced on demand.  But it will happen after several tries.  It seems that the VF page (which is within an IFRAME) is cached somehow?

Has anyone experienced something similar and can suggest a workaround?  We have reached out to Salesforce Support but no luck from that end yet .... 

We also tried to add a JavaScript code to the end of the VF file to refresh the page once onload, but that didn't seem to fix it ...

Thanks in advance!
 
We have a VF page that was originally written for desktop but we've also been using it in SF1 and it has been rendering fine.

Now one of our sandboxes is on Spring '15 and when I look at the page in SF1 in that sandbox (from SF1 on iPad or from Chrome on a PC via one/one.app) the page rendering is all messed up.

I looks to me like all the standard SF style for things like Page Blocks are missing.  Fonts are serif and page is gray and block and section borders are missing.

I'm wondering if something changed in SPring '15 and may I have to add code to get the standard SF styles in my page.

Anyone notice this behavior and have a fix?

(I want to enter a Support Case but that means typing up full instruction for reproducing the case and explaining it to them and I won't have time to do that for a day or two.)
 

We have implemented the live Agent functionality in Production. We have also our portal users for whome this chat functionality provided. Through portal home page , clients can initiate chat (chat button provided on portal). Also we have implemented the Prechat form in order to receive the data like Name, email, Account..

 

This is working fine but clients needs to fill out these details in Prechat form, which is not feasible since they are Portla users. So I am prepopulating these details like name, email in Pre chat form. Used prety simple code at VF (mentioned below) , this is working fine in Salesforce preview. However, when used on Portal , prechat form is not reflecting the correct Name , email in Pre chat form. In the name field this is reflecting Sitename and in email email this is using the by default site user email id.

 

We want when, every client logged in Portal and initiating the chat , in prechat form , Client name and email should be in user context....

 

Please let me know any workaround / solution how to resolve this.

 

I will really appreciate this ....

 

<apex:page showHeader="false" standardController="User" >

    <script>
        function clickBtn()
        {
            var btnSubmit = document.getElementById('prechat_submit');
            btnSubmit.click();
        }
    </script>

    <!-- This script takes the endpoint URL parameter passed from the deployment page and makes it the action for the form -->
    <script type="text/javascript">
        (function()
        {
            function handlePageLoad()
            {
                var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)");
                document.getElementById('prechatForm').setAttribute('action', decodeURIComponent(endpointMatcher.exec(document.location.search)[1]));
            }
            if (window.addEventListener)
            {
                window.addEventListener('load', handlePageLoad, false);
            }
            else
            {
                window.attachEvent('onload', handlePageLoad, false);
            }
        })();
    </script>
   
    <h1>Pre-chat Form</h1>
    <form method='post' id='prechatForm'>
   
        <style type="text/css">
            body {
                margin: 0 auto;
                padding: 0;
                font-family: 'Trebuchet MS', Helvetica, sans-serif;
                font-size: 12px;
                color: #737373;
                line-height: 16px;
            }                   

            p {
                font-weight: bolder
            }
           
            td {
                font-family: 'Trebuchet MS', Helvetica, sans-serif;
            }
           
            h1 {
                font-family: 'Trebuchet MS', Helvetica, sans-serif;
            }

            .btnClass {
                font-family: 'Trebuchet MS', Helvetica, sans-serif;
            }

        </style>

        <!-- Creates an auto-query for a matching Contact record’s Email field based on the value of the liveagent.prechat:Email field -->   
        <table border="0" width="400px">
            <tr>
                <td>
                    <b>Name: </b>
                </td>
                <td>
                    <input type='text' size="40" name='liveagent.prechat:Name' id='prechat_field' value='{!$User.FirstName} {!$User.LastName}' />          
                </td>
            </tr>
            <tr>
                <td>
                    <b>Email Address: </b>
                </td>
                <td>
                    <input type='text' size="40" name='liveagent.prechat:Email' width="500" value='{!$User.Email}' />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Property Name: </b>
                </td>
                <td>
                    <input type='text' size="40" name='liveagent.prechat:Account' value='{!getAccountName}' />
                </td>
            </tr>
            <tr>
                <td>
                   
                </td>
                <td align="center">
                    <input type='submit' value='Request Chat' id='prechat_submit' class="btnClass" />
                </td>
            </tr>
        </table>

        <input type="hidden" name="liveagent.prechat.query:Email" value="Contact,Contact.Email" />        

    </form>


</apex:page>

 

Thanks alot !!!!