• Dan Kidd
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies

Hi,

I'm hitting an error on a validation rule using a mutli-select picklist that doesn't make any sense. The multi-select picklist field is Client_Prducts_c: 

Error is:
 Error: Field Type is a picklist field. Picklist fields are only supported in certain functions.

Rule is:

AND( 
 Type  = "Customer", 
AND( 
 ISBLANK(Client_Prducts__c)
)

But I'm using ISBLANK on the multi select picklist, which according to this thread is allowed:

https://help.salesforce.com/articleView?id=tips_for_using_picklist_formula_fields.htm&type=5

Help!

Thanks
Dan

Hi,

Please can you help me :( I'm trying to implement a VF page that displays (via a section on an Account page) a Google Maps view of where a customer is based based on their shipping address. I have the below page written up but it's just not working - I'm simply getting a grey box where the map should be.
(NB: API key has been redacted, but there is a valid key in there)

I've tried several methods of troubleshooting this but getting no joy, appreciate your help.

Thanks in advance,
Dan
 
<apex:page standardController="Account">
<apex:pageBlock >
<head>
 
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=[REDACTED-API-KEY]&sensor=false"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js?key=[REDACTED-API-KEY]"></script>
<script type="text/javascript"> 
 
$(document).ready(function() {
  
  var myOptions = {
    zoom: 13,
    mapTypeId: google.maps.MapTypeId.roadmap,
    mapTypeControl: false
  }
  
  var map;
  var marker;
  
  var geocoder = new google.maps.Geocoder();
  var address = "{!Account.ShippingStreet}, " + "{!Account.ShippingCity}, " + "{!Account.ShippingPostalcode}";
  
  var infowindow = new google.maps.InfoWindow({
    content: "<b>{!Account.Name}</b>"
  });
 
  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: "{!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>

 
Hi,

I'm getting the below error when converting a lead to an opp:
Error: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301D00000004I5q. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: [] Class.leadconvert.BulkLeadConvert.handleOpportunityInserts: line 413, column 1 Class.leadconvert.BulkLeadConvert.convertLead: line 106, column 1

I've tried hitting the URL for ~/301D00000004I5q and it throws an "Insufficient privileges" error despite me being a full admin.

Thanks,

Dan

Hi there,

Another workflow rule question! I'm looking to set up an e-mail alert when the following criteria are met:
  • When an Account name is changed (not created, only when changed)
  • Account Type = "Customer" or "In delivery"
I'm banging my head against the "you cannot use this operator with a picklist" wall. Help me! The closest I could get is this:
 
AND(
OR(
NOT(ISBLANK(PRIORVALUE( Name ))),ISCHANGED( Name )),
NOT(ISNEW()),
ISPICKVAL (Type  = 'In delivery'),
ISPICKVAL (Type = 'Customer')
)

Thanks,
Dan​
Hi,

This is my first post on SF dev forum, so be gentle :)

I'm trying to create a workflow rule to e-mail X users when the Billing Address on an Account is changed. I currently have the below rule set up but I can't get it to fire. Does anyone have any ideas to make this work/more elegant!
AND( 
OR( 
ISCHANGED(BillingCity), 
ISCHANGED(BillingStreet), 
ISCHANGED(BillingState), 
ISCHANGED(BillingPostalCode)), 
NOT(ISBLANK( PRIORVALUE(BillingCity))), 
NOT(ISBLANK( PRIORVALUE(BillingStreet))), 
NOT(ISBLANK( PRIORVALUE(BillingState))), 
NOT(ISBLANK( PRIORVALUE(BillingPostalCode))), 
NOT(ISNEW()) 
)

Thanks in advance,
Dan

Hi,

I'm hitting an error on a validation rule using a mutli-select picklist that doesn't make any sense. The multi-select picklist field is Client_Prducts_c: 

Error is:
 Error: Field Type is a picklist field. Picklist fields are only supported in certain functions.

Rule is:

AND( 
 Type  = "Customer", 
AND( 
 ISBLANK(Client_Prducts__c)
)

But I'm using ISBLANK on the multi select picklist, which according to this thread is allowed:

https://help.salesforce.com/articleView?id=tips_for_using_picklist_formula_fields.htm&type=5

Help!

Thanks
Dan

Hi,

Please can you help me :( I'm trying to implement a VF page that displays (via a section on an Account page) a Google Maps view of where a customer is based based on their shipping address. I have the below page written up but it's just not working - I'm simply getting a grey box where the map should be.
(NB: API key has been redacted, but there is a valid key in there)

I've tried several methods of troubleshooting this but getting no joy, appreciate your help.

Thanks in advance,
Dan
 
<apex:page standardController="Account">
<apex:pageBlock >
<head>
 
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=[REDACTED-API-KEY]&sensor=false"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js?key=[REDACTED-API-KEY]"></script>
<script type="text/javascript"> 
 
$(document).ready(function() {
  
  var myOptions = {
    zoom: 13,
    mapTypeId: google.maps.MapTypeId.roadmap,
    mapTypeControl: false
  }
  
  var map;
  var marker;
  
  var geocoder = new google.maps.Geocoder();
  var address = "{!Account.ShippingStreet}, " + "{!Account.ShippingCity}, " + "{!Account.ShippingPostalcode}";
  
  var infowindow = new google.maps.InfoWindow({
    content: "<b>{!Account.Name}</b>"
  });
 
  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: "{!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>

 
Hi,

I'm getting the below error when converting a lead to an opp:
Error: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301D00000004I5q. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: [] Class.leadconvert.BulkLeadConvert.handleOpportunityInserts: line 413, column 1 Class.leadconvert.BulkLeadConvert.convertLead: line 106, column 1

I've tried hitting the URL for ~/301D00000004I5q and it throws an "Insufficient privileges" error despite me being a full admin.

Thanks,

Dan

Hi,

This is my first post on SF dev forum, so be gentle :)

I'm trying to create a workflow rule to e-mail X users when the Billing Address on an Account is changed. I currently have the below rule set up but I can't get it to fire. Does anyone have any ideas to make this work/more elegant!
AND( 
OR( 
ISCHANGED(BillingCity), 
ISCHANGED(BillingStreet), 
ISCHANGED(BillingState), 
ISCHANGED(BillingPostalCode)), 
NOT(ISBLANK( PRIORVALUE(BillingCity))), 
NOT(ISBLANK( PRIORVALUE(BillingStreet))), 
NOT(ISBLANK( PRIORVALUE(BillingState))), 
NOT(ISBLANK( PRIORVALUE(BillingPostalCode))), 
NOT(ISNEW()) 
)

Thanks in advance,
Dan