• lavanya g 9
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
  • Recurrence Pattern
 
    • Weekly
    • Monthly
    • Quarterly
    • Yearly
  • Recurrence Range Starting Period
 
      • W1, W2, …, W52
      • M1, M2, …, M12
      • Q1, Q2, Q3, Q4
      • Y1
  • Recurrence Range Ending Period
 
    • Depends on the pattern selected above:
      • W1, W2, …, W52
if I select week: startrage week7 endrange week 14 then I have to create diff of number opty so 7 opty I have to create how can I acheive this very much appricaited help ASAP please...
can anyone help me out to solve the below 2 lines code in lightning component.

var winSearch = decodeURIComponent(window.location.search).split("/");
        var winPath = decodeURIComponent(window.location.pathname).split("/");
Im gettting htis error while owrking on servic elcoud please help me out.User-added image
Im gettting htis error while owrking on servic elcoud please help me out.User-added image
I want to parse the below json and return the Value from DailyApiRequests Max into a Integer.

"ConcurrentSyncReportRuns":{"Max":20,"Remaining":20},
        "DailyAnalyticsDataflowJobExecutions":{"Max":40,"Remaining":40},
        "DailyApiRequests":{"Max":16124600,"Remaining":16123983}

Please helep me .Urgent!!!!
  • July 26, 2018
  • Like
  • 0
Hello,

There is a LiveChat sample given in the developer guide and we reused the same set of code as a PreChat page. The code is as follows
 
<!-- 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);
        }
    })(); 
    function setName() {
            document.getElementById("windowName").value =  
                document.getElementById("firstName").value;
                return true;
            }
    </script>

But the static code analyzer tool gives an error saying Possible Cross-site script (XSS) vulnerability when accessing location.search. How do I fix this issue? The endpoint parameter returned in the URL is already in encoded format and a sample value is
 ?endpoint=https%3A%2F%2F45r.la3-c2cs-chi.salesforceliveagent.com%2Fcontent%2Fs%2Fchat%3Flanguage%3Den_US%23deployment_id%3Dxxxx%26org_id%3Dyyyy%26button_id%3Dzzzz%26session_id%3Daaaaaaa

which is equivalent to 

?endpoint=https://45r.la3-c2cs-chi.salesforceliveagent.com/content/s/chat?language=en_US#deployment_id=xxxx&org_id=yyyy&button_id=zzzz&session_id=aaaaaaa

Can you please let me know how to fix this code?
Hi Experts,

I want to test my controller which has below query:
List<AsyncApexJob> lstApexJob = [SELECT ApexClassId,status FROM AsyncApexJob where ApexClassId in:mapIDs.keySet()and (completedDate=yesterday or completedDate=today) ];
Because there's no Job which is completed on Yesterday or Today so the List is empty and my test coverage cannot reach target percent. So I tried to create a AsyncApexJob data for testing but system said that this object is not writeable:
AsyncApexJob aaj = new AsyncApexJob(completedDate=Date.today());
insert aaj;
Please show me the way to fix this issue.