• Frank Hart 10
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
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.
hello

   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:

AND(NOT(ISNULL( State )),
OR(
LEN( State ) < 2,
NOT(
CONTAINS("AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:" &
"IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:" &
"NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:" &
"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:)

MAnish