• Sam Smith 70
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi Developer Community , 


Can u please write test class for this apex code
public class RSSFeedUtil {
    public static List<RSSObject> getGoogleRSSObjects(String theUrl) {
        List<RSSObject> returnList = new List<RSSObject>();
        
        Http h = new Http();
        HttpRequest req = new HttpRequest();        
        req.setEndpoint(theUrl);
        req.setMethod('GET');
        HttpResponse res = h.send(req);
        
        Dom.Document doc = res.getBodyDocument();
        Dom.XMLNode feed = doc.getRootElement();
        String namespace = feed.getNamespace();
        
        for(Dom.XMLNode child : feed.getChildElements()) {
            if(child.getName() == 'entry') {
                RSSObject returnListItem = new RSSObject(
                    child.getChildElement('title', namespace).getText().unescapeHtml4(),
                    child.getChildElement('link', namespace).getAttribute('href', ''),                    
                    child.getChildElement('content', namespace).getText().unescapeHtml4(),
                    child.getChildElement('published', namespace).getText()
                );
                System.debug(returnListItem);
                returnList.add(returnListItem);
            }
            System.debug(returnList);
        }
        return returnList;        
    }
}

Thanks in Advance
Hello Friends,
I have this  below code.
<apex:page standardController="Account">
    {! Account.Name }
    {! Account.Phone}
</apex:page>
I can comment the code by standard way (" <!-- This is commented part --> ") which I can do with few clicks.

Is there a way using the keyboard shortcut to do so? MS Visual Studio has it. May be the Eclipse too, although not sure.

Please help, thanks!
I am looking to map the Lead Record Type to the Opportunity Record Type when I convert the lead. Right now the Opportunity Record Type populates with a default value. I have only written a few apex triggers as of now and am still new to salesforce, I appreciate any help! 

I have a Web Integration Link in SalesForce that redirects to a page in my server. I want to login and get data from salesforce without ask the password again...using the login in salesforce.

It's possible? My language is c#

Can you help me...it's important!