• romi gupta
  • NEWBIE
  • -1 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
This is the error 
Geocoding Service: You have exceeded your daily request quota for
I know about the limitations, what i need is a solution to the problem

This is the code 

<apex:page standardController="Account" recordSetVar="accounts" >
<apex:pageBlock >
<head>

    <script type="text/javascript" src="https://maps.google.com/maps/api/js?key=xxxixixixixixixixixixixi"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {

  var myOptions = {
    zoom: 20,
    mapTypeId: google.maps.MapTypeId.HYBRID,
    mapTypeControl: true
  }

  var map;
  var marker;
    
  var geocoder = new google.maps.Geocoder();
  var address = new Array();
    <apex:repeat value="{!accounts}" var="addresss">
        if("{!addresss.BillingCountry}" != ""){
        address.push("{!addresss.BillingCountry}");

        }
    </apex:repeat>  
      
  var infowindow = new google.maps.InfoWindow({
    content: ""
  });
 for (var x = 0; x < address.length; x++) {
  console.log();
 console.log(address[x]);
  geocoder.geocode( { address: address[x]}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK && results.length) {
      if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {

        //create map
        map = new google.maps.Map(document.getElementById("map"), myOptions);

        //center map results[0].geometry.location
          // map.setCenter(geoSuccess);

        //create marker
        marker = new google.maps.Marker({
            position: results[0].geometry.location,
            map: map,
            title: "{!Account.Name}"
        });

        //add listeners
        google.maps.event.addListener(marker, 'click', function() {
          infowindow.open(map,marker);
        });
        google.maps.event.addListener(infowindow, 'closeclick', function() {
          map.setCenter(marker.getPosition()); 
        });
          
        

      }

    } else {
      $('#map').css({'height' : '15px'});
      $('#map').html("Oops! {!Account.Name}'s address could not be found, please make sure the address is correct.");
      resizeIframe();
    }
  })};

  function resizeIframe() {
    var me = window.name;
    if (me) {
      var iframes = parent.document.getElementsByName(me);
      if (iframes && iframes.length == 1) {
        height = document.body.offsetHeight;
        iframes[0].style.height = height + "px";
      }
    }
  }

});
            </script>
            <style>
            #map {
                      font-family: Arial;
                      font-size:12px;
                      line-height:normal !important;
                      height:500px;
                      background:transparent;
            }
            </style>
        </head>
            <body>
                <div id="map"></div>
            </body>
    </apex:pageBlock>
</apex:page>


How to center the map after, on your current location that will be helpfull 
  • April 02, 2019
  • Like
  • 0
Hi,
I have a problem regarding an issue within the FSL app and especially the cache:

THE SETUP

Every Day we have between 3-5 Service Appointments each with corresponding work orders for a mobile worker. On each of these Work Orders we have related objects such as related Work Order Line items.
We use a Field Service Lightning Flow that allows the mobile worker to "Clock In" or Out of the service. This Flow queries various related objects starting from the work order in order to present the right information.
We work with the latest FSL App on the latest iOS Version
Caching in the FSL Mobile settings are set to:

Record Data Cache Time in Minutes: 15
Metadata Cache Time in Days: 7
Schedule Update Frequency in Minutes:5 
Enable Full Edit on Records: False

THE CHALLENGE

When the mobile worker clicks the lightning button and executes the flow he has only a slim chance that the flow actually gets the correct information. So we swipe down on the work Order Detail screen in order to get the latest info and there's seemingly a 50/50 chance that he actually gets the correct related records into the cache. (looking at the related tab of the work order). When he does get all infos, everything works perfectly.
We would like to be certain that the flow always gets access to these related records without having to constantly swipe down and hope for the best. 

Any input or ideas on why this happens and/or how to fix it are greatly appreciated.
Hello,

I'm inserting an Attachment on a Case via apex (ParentId=case.Id), which results in a new FeedItem record created on the Case (standard functionality?) (Type='CreateRecordEvent', Visibility='AllUsers', ParentId=case.Id).
I want to update these new FeedItem with Visibility='InternalUsers' with a trigger.

I run into this page: https://developer.salesforce.com/page/Chatter_Code_Recipes
it says: "A final note. FeedItems of type 'UserStatus' and 'TrackedChange' don't invoke the triggers. In other words, if a user updates his/her own status in Chatter or if a tracked field changes value, those events won't fire any triggers.
can we assume that FeedItems of type 'CreateRecordEvent' also doesn't invoke the triggers?

Regards,
Prabhat
Error: Enter a URL that is valid and well-formed
please helpme
see this code
{IF(Opportunity.parent__c==null, 
URLFOR($Action.Opportunity.New,null,[clone=1,id=Opportunity.Id,retURL="/"&Opportunity.Id,00N2800000FJLEz= Opportunity.Name ],true), 
Opportunity.parent__c

}