• MG Consulting
  • NEWBIE
  • 75 Points
  • Member since 2008

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 30
    Questions
  • 43
    Replies

Hi Everyone,

the addError() method which you can use in an Apex Trigger alsways escapes the error message when used in SF1 or Lightning. Has anyone experienced the same and has a solution or should we contact Salesforce with a bug report?

Thanks,

Sten  

 

Wondering if anyone has experienced this issue and has a solution or workaround to get responsive email templates working with Salesforce email templates.

I use an application to build responsive emails, which provides all the html with inline css . When I send a test with with the application or a third party service, it gets delivered with no layout anomalies.
However, when I past the code into a "Custom" Salesforce email template, save it, and send a test, the layout is all distorted on mobile devices. I am guessing Salesforce is ignoring or removing some of the inline CSS. 

Any suggestions to this issue?

Hi,

 

I can't get Type.forName to work for Managed Custom Objects. I have no issue getting it to work for Unmanaged Custom Objects. I've tried all sorts of different combinations of calls to Type.forName and I'm thoroughly stumped :(  Help please!

 

Thanks a lot,

Mike

Hi,

 

I've been unable to execute Apex unit tests for the the past couple of hours

 

I'm getting Organization Administration Locked errors, it looks like this issue may be specific to my org. It seems that a race condition or something of that nature, has occurred that has left my org stuck locked for the past couple of hours.

 

I've logged Case # 07112508 for this issue.

 

Any help you can provide would be greatly appreciated as I'd love to get back to writing code as soon as possible.

 

Thanks a lot,

Mike

Hi,

 

I've got a batch job that works well in manual testing, processing multiple records in each batch without any issues. However my unit test fails if I set the scope greater than just 1 record with a "System.UnexpectedException: Error processing messages". I'm stumped, does anyone know what this cryptic exception means?

 

Thanks a lot,

Mike

Hi,

 

I need to use escape="false" in some of our app's Visualforce pages in order to allow the display of HTML stored in the database. Per SFDC's Security Review of our app (and for good reason), I must sanitize this HTML. Unfortunately, SFDC does not yet provide any built-in methods to do so, therefore, one must roll their own solution.

 

Any ideas on the best way to go about implementing this?

 

Thanks a lot,

Mike 

 

The Outbound Message contains a SessionId and a ServerURL, Is it possible  to use this SessionId and ServerURL to access Salesforce and avoid login/authentication?

 

Thanks

Jon

 

Hi,

 

I'm creating a Visualforce page for Sys Admins on which I would like be able to display a drop down of all Sites in the org if possible. From what I can tell, the Sites info is stored in the metadata but, unfortunately, it doesn't seem like there is a way to access this particular metadata from Apex.

 

Any ideas?

 

Thanks a lot,

Mike 

I am using the Pattern and Matcher classes to search text from an email.  Sometimes, I get an exception that says Regex too complicated.  I can't find any information on this.  Does anyone know what can cause?  I get the premise of the exception but don't know what to do to fix it.  If I put my regular expression and sample text into the tester on this site, http://www.fileformat.info/tool/regex.htm.  It works fine and returns what I want.  From what I understand Salesforce uses similar functionality as Java which the above site is using.  Any ideas?  Thanks.

Hi,

 

When I try to pass the following custom apex class to a custom component via the attribute's assignTo I get an internal server error (Error ID: 461678711-978 (887763395)). I'm pretty sure this has to do with trying to pass it an SObjectField.

 

I need to pass the component either a FieldDescribeResult or an SObjectField in order to avoid hitting governor limits with fields.getMap() calls.

 

Any ideas?

 

 

public class StandardQuestionObj {

public StandardQuestionObj(StandardQuestion__c sObj, SObjectField sObjField) {
this.SObj = sObj;
this.SObjField = sObjField;
}

public StandardQuestion__c SObj { get; set; }
public SObjectField SObjField { get; set; }
}

 

<apex:component id="standardQuestionComponent" controller="StandardQuestionController">
<apex:attribute name="standardQuestionObj" description="The Standard Question Object." type="StandardQuestionObj" required="true" assignTo="{!StdQuestionObj}"/>

...

</apex:component>

 

 

Thanks a lot,

Mike

 

Hi,

 

Quick question, the answer to which I am guessing is currently no but someday yes:

 

<apex:inputField value="{!Contact.Name}"/> <!-- Static -->

 

<apex:inputField value="{!Contact.get('Name')}"/> <!-- Dynamic -->

 

Is there anyway currently to do something like the Dynamic example above, so that the field my be varied at runtime?

 

It would certainly make my life a whole lot easier... 

 

Thanks a lot,

Mike 

Hi,

I can't access a custom component's attribute value from it's controller's constructor. Below is a simple test case that demostrates the problem:
 

<apex:page showHeader="false"> <c:Scratch testAttr="Test Value"/></apex:page>

 

<apex:component controller="Scratch"> <apex:attribute name="testAttr" description="test desc" type="String" assignTo="{!TestProp}"/> <div> <apex:outputText value="testAttr: {!testAttr}"/> </div> <div> <apex:outputText value="TestProp: {!TestProp}"/> </div></apex:component>

 

 

public class Scratch { public Scratch() { System.debug('TEST_PROP: ' + TestProp); } public String TestProp { get; set; } }

 

As you can see the outputText for both testAttr & TestProp correctly dislpay "Test Value" but the System.debug message shows TestProp's value as being null.
 
Anyone know what's going on here?
 
Thanks a lot,
Mike

Hi,

 

Does anyone know under what circumstances a custom component's controller would be instainated twice? This custom component only appears once on the page. I have other custom components who's constructors only get instainated once as expected.

 

I have tried to root cause it by creating a blank custom component/controller combo and adding suspect functionality to it one by one, but have been unsuccessful thus far. 

 

Thanks,

Mike

Hi,

 

I have inputText components along side inputField components in a form and thus I would like to be able to display errors associated with inputText components next to them via the message component. Right now, I am forced to display them in the messages component at the bottom of the form. This is awkard, and not ideal, because if an inputField has an error it displays next to it and if an inputText has an error it displays it at the bottom of the form.

 

 

It seems the only error you can get to display in the message component for an inputText is the standard required message by setting required equal to true.

 

 

Is there anyway to add custom error messages associated with a specific inputText component like I can with inputFields?

 

 

Thanks a lot,

Mike