• lavanya g 9
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
  • 5
  • 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.


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

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=([^&#]*)");
        if (window.addEventListener) {
            window.addEventListener('load', handlePageLoad, false);
        } else {
            window.attachEvent('onload', handlePageLoad, false);
    function setName() {
            document.getElementById("windowName").value =  
                return true;

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

which is equivalent to 


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.