• James Pullman
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Systems Manager/Salesforce Admin

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
We have created a table originating from a master object of detail related items on a visualforce page for a very simple process however, we would like to group and sort the rows visually on that page by a field on that row which is a child
object (which is always populated)

For context the parent (master) object is a Sales Order, the row (detail) level are the order lines and the field we want to group the sections of rows by is a field on the line level object called "Category".

Below is an excel mock up of what we'd hope for it to look like.
User-added image
Hi there, I am not a SF developer but I am a savvy admin and I understand html and such. What I am wanting to do is create a very simple visual force page and inside it imbed a very simple HTML text list that I can reuse in different areas around our org (lightning components on page layouts and a utility bar visualforce component), but only have one place to make edits. 

What should the opening and closing text of a VF page that simply will store a some unordered html text and lists. I know how to build the list in HTML but don't know how to "wrap" that list in a VF page if that makes sense.

Right now I simply us a rich text lightning component on a home page layout and multiple company department apps. But every time I want to add a link or make edits, I have to do it in 9 places. I would like to have one master VF page that I manage and it updates it everywhere. Below is a screenshot (sensitive parts blurred) showing what I am trying to create. Simply a list of internal company quick links for employees.User-added image

 
I am trying to embed a map on a custom object referencing a custom formula address line on the particular object and I am getting the error above. Code is below. I have searhed other threads and they don't quite reference my question.
 
<apex:page standardController="Field_Service__c">

<head>

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

$(document).ready(function() {

  var myOptions = {
    zoom: 15,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    mapTypeControl: false
  }

  var map;
  var marker;

  var geocoder = new google.maps.Geocoder();
  var address = "{!Field_Service__c.LocationAddress__c}";

  var infowindow = new google.maps.InfoWindow({
    content: "<b>{!Field_Service__c.LocationAddress__c}"
  });

  geocoder.geocode( { address: address}, 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
        map.setCenter(results[0].geometry.location);

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

        //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! {!Field_Service__c.Account--c}'s location 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";
      }
    }
  }</div>

});
</script>

<style>
#map {
  font-family: Arial;
  font-size:12px;
  line-height:normal !important;
  height:250px;
  background:transparent;
}
</style>

</head>

<body>
<div id="map"></div> 
</body> 
</apex:page>

 
We have created a table originating from a master object of detail related items on a visualforce page for a very simple process however, we would like to group and sort the rows visually on that page by a field on that row which is a child
object (which is always populated)

For context the parent (master) object is a Sales Order, the row (detail) level are the order lines and the field we want to group the sections of rows by is a field on the line level object called "Category".

Below is an excel mock up of what we'd hope for it to look like.
User-added image