• Frank Hart 10
  • 0 Points
  • Member since 2023

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 4
deploying issue in salesforce text area to rich text field in salesforce.

Source org converted text area to rich text area. 

while deploying same field text area in target org . facing below issue in salesforce.

"Conversion to Html only supported from LongTextArea".

Kindly help to resolve this issue.

   i write a test method for a controller.but i get only  71% code coverage.

  i am facing  problem to write the test method for get set method.please help me

 here is my code:
public class eiException extends exception{
    public String code{get; set;}
    public String text{get; set;}
    public String severity{get; set;}
    public String category{get; set;}
    public String subcategory{get; set;}
    public String dataState{get; set;}
    public Boolean retryAllowed{get; set;}
    public String additionalInformation{get; set;}
    public eiException(Dom.XmlNode node){
        dom.XmlNode p;
        p=node.getChildElement('code', eiEnvelope.namespace);
        if(p != null){code = p.getText();}
        p=node.getChildElement('text', eiEnvelope.namespace);
        if(p != null){text = p.getText();}
        p=node.getChildElement('severity', eiEnvelope.namespace);
        if(p != null){severity = p.getText();}
        p=node.getChildElement('category', eiEnvelope.namespace);
        if(p != null){category = p.getText();}
        p=node.getChildElement('subcategory', eiEnvelope.namespace);
        if(p != null){subcategory = p.getText();}
        p=node.getChildElement('dataState', eiEnvelope.namespace);
        if(p != null){dataState = p.getText();}
        p=node.getChildElement('retryAllowed', eiEnvelope.namespace);
        if(p != null){retryAllowed = p.getText().equalsIgnoreCase('true');}
        p=node.getChildElement('additionalInformation', eiEnvelope.namespace);
        if(p != null){additionalInformation = p.getText();}
    public static testmethod void testeiException() {
        DOM.Document doc = new DOM.Document();
        dom.XmlNode envelope= doc.createRootElement('Envelope',null,null);
        dom.XmlNode body= envelope.addChildElement('code', null, null);

        eiException eiEx = new eiException(body);
Salesforce technical architect available for hire in Austin,Tx.

Certifications: Certified Advanced Administrator, Certified Developer, Certified Consultant, Certified Sales Cloud Consultant, Certified Service Cloud Consultant.

- Expert in Visualforce, Apex, Webservices and application architecture and design.
- Languages - C#, Visual Basic .Net, ASP.Net, conceptual knowledge of Java.
- Designed and Implemented 3 AppExchange Applications
- Led development teams onshore and offshore at a 60B company
- Very knowledgable in network design and infrastructure

Email architect@qlocal.com or call 210-885-0019 for more information.
  • October 17, 2011
  • Like
  • 1
Hi All,

I dont know if its the case of CONTAINS but when I tried using the famous two letter US State validation code then it didnt allow me to save a record when I dont have any data for address field. To be more specific following valiation is norammly used on Leads to verify if the user has correctly entered valid US code:

LEN( State ) < 2,
"WA:WV:WI:WY", State )

But when I dont want to fill any address info then also this formula restricts me to save Lead record making address as a required field.

Please let me know how to modify this: I only need validation when State field is filled and NOT when either State or all five address fields are empty.

Any clue is highly appreciated:)