• Ramandeep_Singh
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 9
    Replies
Hi all,

I want to know is there any way to get real time location on google maps using vfp??
Lets say, if I change my location the vfp should be updated.
Please provide help.

Thanks and regards,
Ramandeep
Hi all,

I am new to this and have been trying to access the twitter api -statuses/user_timeline.json.using the below code in apex
public class tweetUtil {
    public static final String[] SIGNATURE_KEYS = new String[]
        {'oauth_consumer_key', 
        'oauth_nonce', 
        'oauth_signature_method', 
        'oauth_timestamp', 
        'oauth_token', 
        'oauth_version', 
        'status'};
        
    public static final String[] OAUTH_KEYS = new String[]
        {'oauth_consumer_key',
        'oauth_nonce',
        'oauth_signature',
        'oauth_signature_method',
        'oauth_timestamp',
        'oauth_token',
        'oauth_version'};

    public String algorithmName {
        get {
            if(algorithmName == null)
                return 'hmacSHA1';
            return algorithmName;
        } 
        set;}
    public String oauth_signature_method {
        get {
            if(oauth_signature_method == null)
                return 'HMAC-SHA1';
            return oauth_signature_method;
        }
        set;}
    public String oauth_version {
        get {
            if(oauth_version == null)
                oauth_version = '1.0';
            return oauth_version;
        } 
        set;}          
    public String http_method {get; set;}
    public String base_url {get; set;}
    public String status {get; set;}
    public String oauth_consumer_key {get; set;}
    public String oauth_consumer_secret {get; set;}
    public String oauth_token {get; set;}
    public String oauth_token_secret {get; set;}
    
    public String oauth_nonce {get; private set;}
    public String oauth_signature {get; private set;}
    public String oauth_timestamp {
        get {
            if(oauth_timestamp == null)
                oauth_timestamp = String.valueOf(DateTime.now().getTime()/1000);
            return oauth_timestamp;
        }
        private set;}
    
    private map<String, String> signaturePairs {get; set;}
    private String parameterString {get; set;}
    private String signatureBaseString {get; set;}
    private String signingKey {get; set;}
    private String oauth_header {get; set;}
    private String http_body {get; set;}
    
    public TweetUtil() {}
    
    public TweetUtil(String oauth_consumer_key, String oauth_consumer_secret, String oauth_token, String oauth_token_secret) {
        this.oauth_consumer_key = oauth_consumer_key;
        this.oauth_consumer_secret = oauth_consumer_secret;
        this.oauth_token = oauth_token;
        this.oauth_token_secret = oauth_token_secret;
        system.debug('**** Created successfully');
    }
    
    public Boolean sendTweet(String status, map<String, String> additionalParams) {
        if(this.oauth_consumer_key == null ||
           this.oauth_consumer_secret == null ||
           this.oauth_token == null || 
           this.oauth_token_secret == null)
            return false;
        
        this.http_method = 'GET';
        this.base_url = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=@onactuate&count=10';
        this.status = status;
        generateNonce();
        initializeSignatureKeyValuePairs(additionalParams);
        generateOauthSignature();
        generateOauthHeader();
        generateHttpBody(additionalParams);
        
        Http h = new Http();
        HttpRequest req = new HttpRequest();
        req.setMethod(this.http_method);
        req.setEndpoint(this.base_url);
        req.setBody(this.http_body);
        req.setHeader('Content-Type', 'application/x-www-form-urlencoded');
        req.setHeader('Content-Length', String.valueOf(req.getBody().length()));
        req.setHeader('Authorization', this.oauth_header);

        try {
            HttpResponse res = h.send(req);
            system.debug('**** Response: ');
            system.debug(res);
            system.debug(res.getBody());
            
            if(res.getStatusCode() == 200)
                return true;
            else 
                return false;
        } catch (CalloutException e) {
            return false;
        }
        return true;
    }
    
    private void generateNonce() {
        String validChars = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        Integer len = validChars.length();
        String randomString = '';
        
        for(Integer i=0; i<32; i++) {
            Integer rInt = Integer.valueOf(Math.rint(Math.random()*(len-1)));
            randomString += validChars.substring(rInt, rInt+1);
        }
        this.oauth_nonce = randomString;
    }
    
    private void initializeSignatureKeyValuePairs(map<String, String> additionalParams) {
        this.signaturePairs = new map<String, String>();
        this.signaturePairs.put('status', this.status);
        this.signaturePairs.put('oauth_consumer_key', this.oauth_consumer_key);
        this.signaturePairs.put('oauth_nonce', this.oauth_nonce);
        this.signaturePairs.put('oauth_signature_method', this.oauth_signature_method);
        this.signaturePairs.put('oauth_timestamp', this.oauth_timestamp);
        this.signaturePairs.put('oauth_token', this.oauth_token);
        this.signaturePairs.put('oauth_version', this.oauth_version);
        if(additionalParams != null && additionalParams.keySet().size() > 0) {
            for(String key : additionalParams.keySet()) {
                if(!this.signaturePairs.containsKey(key) && additionalParams.get(key) != null) {
                    //system.debug('**** adding key: ' + key + ' and value: ' + additionalParams.get(key));
                    this.signaturePairs.put(key, additionalParams.get(key));
                    SIGNATURE_KEYS.add(key);
                }
            }
        }
        SIGNATURE_KEYS.sort();  //The keys have to be sorted when generating the signature
    }
    
    private void generateOauthSignature() {
        this.parameterString = createParameterString();
        this.signatureBaseString = createSignatureBaseString();
        this.signingKey = createSigningKey();
        this.oauth_signature = createOauthSignature();
    }
    
    private String createParameterString() {
        String paramString = '';
        system.debug(json.serializepretty(signaturePairs));
        for(String key : SIGNATURE_KEYS) {
            paramString += StringUtil.percentEncode(key);
            paramString += '=';
            paramString += StringUtil.percentEncode(signaturePairs.get(key));
            paramString += '&';
        }
        paramString = removeLastNLetters(paramString, 1);
        system.debug('**** Parameter String');
        system.debug(paramString);
        return paramString;
    }
    
    private String createSignatureBaseString() {
        String sigBase = '';
        sigBase += this.http_method.toUpperCase() ;
        sigBase += '&';
        sigBase += StringUtil.percentEncode(this.base_url);
        sigBase += '&';
        sigBase += StringUtil.percentEncode(this.parameterString);
        system.debug('**** Signature Base String');
        system.debug(sigBase);
        return sigBase;
    }
    
    private String createSigningKey() {
        String signKey = StringUtil.percentEncode(this.oauth_consumer_secret);
        signKey += '&';
        signKey += StringUtil.percentEncode(this.oauth_token_secret);
        system.debug('**** Signing Key');
        system.debug(signKey);
        return signKey;
    }
    
    private String createOauthSignature() {
        Blob mac = Crypto.generateMac(this.algorithmName, Blob.valueOf(this.signatureBaseString), Blob.valueOf(this.signingKey)); 
        string hashedValue = EncodingUtil.convertToHex(mac);
        String oauthSig = EncodingUtil.base64Encode(mac);
        system.debug('**** Hashed Value');
        system.debug(hashedValue);
        system.debug('**** Oauth Signature');
        system.debug(oauthSig);
        return oauthSig;  
    }
    
    private void generateOauthHeader() {
        map<String, String> oauthParams = new map<String, String>();
        oauthParams.put('oauth_consumer_key', this.oauth_consumer_key);
        oauthParams.put('oauth_nonce', this.oauth_nonce);
        oauthParams.put('oauth_signature', this.oauth_signature);
        oauthParams.put('oauth_signature_method', this.oauth_signature_method);
        oauthParams.put('oauth_timestamp', this.oauth_timestamp);
        oauthParams.put('oauth_version', this.oauth_version);
        oauthParams.put('oauth_token', this.oauth_token);
        String header = 'OAuth ';
        for(String key : OAUTH_KEYS) {
            header += StringUtil.percentEncode(key);
            header += '="';
            header += StringUtil.percentEncode(oauthParams.get(key));
            header += '", ';
        }
        this.oauth_header = removeLastNLetters(header, 2);
        system.debug('**** Oauth Header');
        system.debug(this.oauth_header);
    }
    
    private void generateHttpBody(map<String, String> additionalParams) {
        String httpBody = 'status='+EncodingUtil.urlEncode(this.status, 'UTF-8');
        if(additionalParams != null && additionalParams.keySet() != null) {
            for(String key : additionalParams.keySet()) {
                if(additionalParams.get(key) != null) {
                    httpBody += '&';
                    httpBody += EncodingUtil.urlEncode(key, 'UTF-8');
                    httpBody += '=';
                    httpBody += EncodingUtil.urlEncode(additionalParams.get(key), 'UTF-8');
                }
            }
        }
        this.http_body = httpBody.replace('*', '%2A'); //for some reason, '*' breaks twitter
        system.debug('**** Request Body: ');
        system.debug(this.http_body);
    }
    
    private static String removeLastNLetters(String source, Integer numToRemove) {
        return source.subString(0, source.length()-numToRemove);
    }
}

and I am getting the error below:
{"errors":[{"code":32,"message":"Could not authenticate you."}]}

Do i need to add some additional parameters? or i need to make some changes in code. Please suggest.

Thanks and Regards,
Ramandeep 
Hi all,

I'm trying to display field's data in VF page. Function is like, when selectting the object from picklist which is in vfp the related fields will be displayed in another picklist. On clicking the botton the field's data related to the selected picklist value should be displayed on the Vfp.

Visual Force Page:
<apex:page controller="objectController">
    <apex:form > 
        <apex:pageBlock >
            <apex:pageBlockSection columns="4">
                
                <apex:pageBlockSectionItem >
                    <apex:outputlabel value="Object :"/> 
                    <apex:actionRegion >      
                        <apex:selectList value="{!selectedObject}" size="1">
                            <apex:selectOptions value="{!ObjectNames}"/>
                            <apex:actionSupport event="onchange" rerender="myFields,myFields1"/>
                        </apex:selectList>
                    </apex:actionRegion>                         
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem >
                    <apex:outputlabel value="Field 1"/>   
                    <apex:outputPanel id="myFields">   
                        <apex:actionRegion >  
                            <apex:selectList value="{!selectedField}" size="1">
                                <apex:selectOptions value="{!ObjectFields}"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem >
                    <apex:outputlabel value="Field 2"/>   
                    <apex:outputPanel id="myFields1">   
                        <apex:actionRegion >  
                            <apex:selectList value="{!selectedField2}" size="1">
                                <apex:selectOptions value="{!ObjectFields}"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:commandButton action="{!output}" value="Select">
                        <apex:actionSupport event="onclick" rerender="mychart"/>
                    </apex:commandButton>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockSection >
                <apex:pageBlockSectionItem >
                    <apex:pageBlockTable value="{!oList}" var="ac">
                        <apex:column value="{!ac['selectedField']}"/>
                        
                    </apex:pageBlockTable>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            
            
        </apex:pageBlock>
    </apex:form>
</apex:page>
ERROR: Invalid field selectedField for SObject Account // On clicking 
Custom Controller:
 
public class objectController
{
    public Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    public List<sObject> oList {get; set;}
    public String selectedObject {get; set;}
    
    public String selectedField {get; set;}
	public String selectedField2 {get; set;}    
    
    
    Public objectController()
    {   
        selectedObject = 'Account';
    }
    
    public List<SelectOption> getObjectNames()
    {
        List<SelectOption> objNames = new List<SelectOption>();
        List<String> entities = new List<String>(schemaMap.keySet());
        entities.sort();
        for(String name : entities)
        {
            objNames.add(new SelectOption(name,name));
        }
        return objNames;
    }
    
    public List<SelectOption> getObjectFields()
    {
        Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
        Schema.SObjectType ObjectSchema = schemaMap.get(selectedObject);
        Map<String, Schema.SObjectField> fieldMap = ObjectSchema.getDescribe().fields.getMap();
        List<SelectOption> fieldNames = new List<SelectOption>();
        for (String fieldName: fieldMap.keySet())
        {
            fieldNames.add(new SelectOption(fieldName,fieldName));
            //fieldMap.get(fieldName).getDescribe().getLabel();//It provides to get the object fields label.
        }
        return fieldNames;
    }
    public List<SelectOption> getObjectFields2()
    {
        Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
        Schema.SObjectType ObjectSchema = schemaMap.get(selectedObject);
        Map<String, Schema.SObjectField> fieldMap = ObjectSchema.getDescribe().fields.getMap();
        List<SelectOption> fieldNames = new List<SelectOption>();
        for (String fieldName: fieldMap.keySet())
        {
            fieldNames.add(new SelectOption(fieldName,fieldName));
            //fieldMap.get(fieldName).getDescribe().getLabel();//It provides to get the object fields label.
        }
        return fieldNames;
    }
    
    public void output()
    {
        system.debug('object'+selectedObject);
        String soqlQuery = 'select '+selectedField+', id, '+selectedField2+' from '+selectedObject;
        system.debug(soqlQuery);
        oList= Database.query(soqlQuery);
        system.debug(olist);
    }
}

Please let me know were am I lacking. It would be really helpful.

Thanks and Regards,
Ramandeep
 
 
Hi all,
I am trying to search news on the bases of account name and in the search box account name is displayed but, on searching there is no news or not even related drop down topic.

Error
*********************************Wrapper Class**********************************
public with sharing class YahooRssWrapper {
    public class channel {
        public String title {get;set;}
        public String link {get;set;}
        public String description {get;set;}
        public String language {get;set;}
        public String category {get;set;}
        public String copyright {get;set;}
        public String pubDate {get;set;}
        public String ttl {get;set;}
        public YahooRssWrapper.image image {get;set;}
        public list<YahooRssWrapper.item> items {get;set;}
        public channel() {
            items = new list<YahooRssWrapper.item>();
        }
    }
     
    public class image {
        public String url {get;set;}
        public String title {get;set;}
        public String link {get;set;}
    }
     
    public class item {
        public String title {get;set;}
        public String guid {get;set;}
        public String link {get;set;}
        public String description {get;set;}
        public String pubDate {get;set;}
        public String source {get;set;}
        public Date getPublishedDate() {
            Date result = (pubDate != null) ? Date.valueOf(pubDate.replace('T', ' ').replace('Z','')) : null;
            return result;
        }
        public DateTime getPublishedDateTime() {
            DateTime result = (pubDate != null) ? DateTime.valueOf(pubDate.replace('T', ' ').replace('Z','')) : null;
            return result;            
        }
    }
     
    public static YahooRssWrapper.channel getRSSData(string feedURL) {
        //Todo Remove
        //feedURL ='http://news.search.yahoo.com/rss?ei=UTF-8&p=Rainmaker&fr=sfp';        
        HttpRequest req = new HttpRequest();
        req.setEndpoint(feedURL);
        req.setMethod('GET');        
        Dom.Document doc = new Dom.Document();
        String xmlDom = '';
        Http h = new Http();
        HttpResponse res; 
        if (!Test.isRunningTest()){ 
            try{
                res = h.send(req);
            }catch(Exception ex){
                return null;
            }
            // Generate the HTTP response as an XML stream          
            if(res.getBody() != null){              
                doc.load(res.getBody().replace('&', EncodingUtil.urlEncode('&','UTF-8')).replace('<![CDATA[','').replace(']]>',''));//res.getBody());
            }            
            
        } else {
            String xmlString = '<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"><channel><title>salesforce.com - Bing News</title><link>http://www.bing.com/news</link><description>Search Results for salesforce.com at Bing.com</description><category>News</category><os:totalResults>3370</os:totalResults><os:startIndex>0</os:startIndex><os:itemsPerPage>10</os:itemsPerPage><os:Query role="request" searchTerms="salesforce.com" /><copyright>These XML results may not be used, reproduced or transmitted in any manner or for any purpose other than rendering Bing results within an RSS aggregator for your personal, non-commercial use. Any other use requires written permission from Microsoft Corporation. By using these results in any manner whatsoever, you agree to be bound by the foregoing restrictions.</copyright><image><url>http://www.bing.com/s/a/rsslogo.gif</url><title>Bing</title><link>http://www.bing.com/news</link></image><docs>http://www.rssboard.org/rss-specification</docs><item><title>Salesforce.com Makes Friends With CIOs - Information Week</title><guid>http://informationweek.com/news/cloud-computing/software/232602782</guid><link>http://informationweek.com/news/cloud-computing/software/232602782</link><description>Parade of CIOs at CloudForce shows how social networking inroads are making Salesforce.com a larger part of the IT infrastructure. Salesforce.com isn&apos;t just for sales forces anymore. Its Chatter app has opened a social networking avenue into the enterprise ...</description><pubDate>2012-03-19T15:21:47Z</pubDate><source>Information Week</source></item></channel></rss>';
            doc.load(xmlString);
        }
         
        Dom.XMLNode rss = doc.getRootElement();
        //first child element of rss feed is always channel
        Dom.XMLNode channel = rss.getChildElements()[0];
         
        YahooRssWrapper.channel result = new YahooRssWrapper.channel();
         
        list<YahooRssWrapper.item> rssItems = new list<YahooRssWrapper.item>();
         
        //for each node inside channel        
        for(Dom.XMLNode elements : channel.getChildElements()) {
            if('title' == elements.getName()) {
                    System.debug(')))))))))))))))))'+elements);
                result.title = elements.getText();
            }
            if('link' == elements.getName()) {
                result.link = elements.getText();
            }
            if('description' == elements.getName()) {
                result.description = elements.getText();
            }
            if('category' == elements.getName()) {
                result.category = elements.getText();
            }
            if('copyright' == elements.getName()) {
                result.copyright = elements.getText();
            }
            if('ttl' == elements.getName()) {
                result.ttl = elements.getText();
            }
            if('image' == elements.getName()) {
                YahooRssWrapper.image img = new YahooRssWrapper.image();
                //for each node inside image
                for(Dom.XMLNode xmlImage : elements.getChildElements()) {
                    if('url' == xmlImage.getName()) {
                        img.url = xmlImage.getText();
                    }
                    if('title' == xmlImage.getName()) {
                        img.title = xmlImage.getText();
                    }
                    if('link' == xmlImage.getName()) {
                        img.link = xmlImage.getText();
                    }
                }
                result.image = img;
            }
             
            if('item' == elements.getName()) {
                YahooRssWrapper.item rssItem = new YahooRssWrapper.item();
                //for each node inside item
                for(Dom.XMLNode xmlItem : elements.getChildElements()) {                    
                    if('title' == xmlItem.getName()) {
                        rssItem.title = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                    if('guid' == xmlItem.getName()) {
                        rssItem.guid = xmlItem.getText();
                    }
                    if('link' == xmlItem.getName()) {
                        rssItem.link = xmlItem.getText();
                    }
                    if('description' == xmlItem.getName()) {
                        rssItem.description = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                    if('pubDate' == xmlItem.getName()) {
                        rssItem.pubDate = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                    if('source' == xmlItem.getName()) {
                        rssItem.source = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                }
                //for each item, add to rssItem list
                rssItems.add(rssItem);
            }
        }
        //finish YahooRssWrapper.channel object by adding the list of all rss items
        result.items = rssItems;        
        return result;
    }
     
}
***********************************************************************************

*************************************Class****************************************
public with sharing class RSSNewsReader { 
    public String rssQuery {get;set;}
    public boolean recordNotFound{get;set;}
    public String age{get;set;}     
    public YahooRssWrapper.channel rssFeed {get;set;}
    
    public RSSNewsReader(ApexPages.StandardController controller) {
        age = apexpages.currentpage().getparameters().get('age');
        String query = apexpages.currentpage().getparameters().get('q');
        if(age == null || age.trim().equals('')){
            age = '';
        }
        if(query == null || query.trim().equals('')){
                Account objAcc = [SELECT Name FROM Account WHERE Id=:controller.getRecord().Id ];
            rssQuery = ObjAcc.Name;//default on load
        } else{
            rssQuery = query;
            system.debug('@@@@@@' + rssQuery);
        }       
        init('http://news.search.yahoo.com/rss?p='+EncodingUtil.urlEncode(rssQuery,'UTF-8')+'&fr=sfp&age=' + age.trim());
    }


    private void init(String rssURL) {
        try{
            recordNotFound = true;
            rssFeed = YahooRssWrapper.getRSSData(rssURL);            
        }catch(Exception ex){
            recordNotFound = false;
        }
    }
    
     public pagereference getRSSFeed2() {  
        apexpages.currentpage().getparameters().put('q',rssQuery);      
        init('http://news.search.yahoo.com/rss?p='+EncodingUtil.urlEncode(rssQuery,'UTF-8')+'&fr=sfp&age=' + age.trim());        
        return null;
     }
}
************************************************************************************

*********************************Visualforcepage**********************************
<apex:page standardController="Account" showHeader="false" sidebar="false" extensions="RSSNewsReader">
<style type="text/css">
    body {
    font: 13px/1.231 arial,helvetica,clean,sans-serif;
    }

    #results .yschttl, #yschiy .yschttl {
    font-size: 123.1%;
    }

    #web h3 {
    font-weight: normal;
    }

    #results .res {
    margin-bottom: 17px;
    }

    .res {
    position: relative;
    }

    #web ol li a.yschttl:link, #web li .active a:link {
    color: #0000DE;
    }

    li {
    list-style: none;
    }

    #web .res .url {
    color: #A0A0A0;
    }

    #web .url, .yschurl {
    color: green;
    font-weight: bold;
    }

    h1 {
        border-bottom: 2px solid threedlightshadow;
        font-size: 160%;
        margin: 0 0 0.2em;
    }


    #feedSubtitleText {
        color: threeddarkshadow;
        font-size: 110%;
        font-weight: normal;
        margin: 0 0 0.6em;
    }

    .msg {
    background: #FEFBDD;
    margin-left: 128px;
    margin-right: 5px;
    padding: 9px;
    word-wrap: break-word;
    font-size: 16px;
    margin-bottom: 16px;
    padding-left: 11px;
    }
    #left-panel ul{list-syle:none}
    #left-panel ul li{padding:2px; margin:0;list-style:none;display:block;clear:left}
    #logo {
    height: 37px;
    left: -2px;
    margin-top: 0px;
    position: absolute;
    top: 1px;
    width: 168px;
    background-image: url(http://l.yimg.com/pv/i/all/vertical/news/us_srp_metro_news_201301281307.png);
    background-size: 80%;
    background-repeat: no-repeat;
    }
    .listHeading{
    color: #949FA6;
        font-size: 13px;
        font-weight: 400;
        margin: 0 0 3px 8px;
        text-transform: uppercase;
    }
    .listItems{
        margin: 0;
        padding: 5px 0;    
    }
    .listItems a{
        color: #1A4B8E;
        text-decoration: none;
        white-space: nowrap;    
    }

    #anyTime{
        color:{!IF($CurrentPage.parameters.age == '','black !important','#1A4B8E')};
    }
    #d1{
        color:{!IF($CurrentPage.parameters.age == '1d','black !important','#1A4B8E')};
    }
    #h1{
        color:{!IF($CurrentPage.parameters.age == '1h','black !important','#1A4B8E')};
    }
    #h1{
        color:{!IF($CurrentPage.parameters.age == '1w','black !important','#1A4B8E')};
    }
</style>
<apex:form id="yahooFormId">
<div>
    <div id="left-panel" style="width:9.9%; float:left;">
    <span id="logo"></span>        
        <ul style="margin:58px 0 0 10px; padding:2px 0;">
            <li class="listHeading">Filter by Time</li> 
            <li class="listItems"><a href="/apex/yahooRSSFeed?q={!rssQuery}&age=" id="anyTime">Any time</a></li>
            <li class="listItems"><a href="/apex/yahooRSSFeed?age=1h&q={!rssQuery}" id="h1">Past hour</a></li>
            <li class="listItems"><a href="/apex/yahooRSSFeed?age=1d&q={!rssQuery}" id="d1">Past day</a></li>
            <li class="listItems"><a href="/apex/yahooRSSFeed?age=1w&q={!rssQuery}" id="w2">Past week</a></li>        
        </ul>
    </div>
    <div id="results" style="width:90%; float:left; ">
        <div id="feedTitleContainer" style="margin-left: 58px;">
           <apex:inputText style="border-color: #929292 #D5D5D5 #D5D5D5 #929292;border-style: solid;border-width: 1px; height: 18px;
                padding: 3px 10px;width: 534px;" value="{!rssQuery}"/> 
           <apex:commandButton style="background: #FDCE3E;border: 1px solid #E5A716;color: #434343;height: 26px;margin-left: 7px;
                padding: 0 23px;font-size: 15px; font-weight: bold;" action="{!getRSSFeed2}" value="Search" reRender="yahooFormId"/>          
        </div>
        <div id="web" style="border-left:solid 1px #ccc;">
            <ol start="0">
                <apex:repeat value="{!rssFeed.items}" var="n">
                    <li>
                        <div class="res">
                            <div>
                                <h3>
                                    <a class="yschttl spt" href="{!n.link}">                                 
                                        <apex:outputText value="{!n.title}" escape="false"/> 
                                    </a>
                                </h3>
                            </div>
                    
                            <div class="abstr">
                                <apex:outputText value="{!n.Description}" escape="false"/>
                            </div>
                    
                            <span class="url">
                                <apex:outputText value="{!n.source} {!n.pubDate}" escape="false"/>
                            </span>
                        </div>
                    </li>
                </apex:repeat>
            </ol>    
        </div>
    </div>
</div>
<apex:outputPanel rendered="{!IF(OR(!recordNotFound, rssFeed.items == null, rssFeed.items.size == 0),true,false)}">
    <ol start="0">
        <li>
            <p class="msg zrpmsg">We did not find results for: <b>{!rssQuery}</b> <strong> </strong>. Try the suggestions below or type a new query above.</p>      
        </li>
    </ol>
</apex:outputPanel>
</apex:form>
</apex:page>

Please anyone help me out of this. It will be really grateful.

Thanks and Regards,
Ramandeep
Hi all,

I want to display news feed from external source using visualforce. I tried using javascript and some sample codes yet no output.

Please provide some help. If possible, with code. It will be really helpul.

Thanks and Regards
Ramandeep 
Hi Guys,

I am trying to pop up a alert window when there is any change in the desired case field.
And then looked to online solution and got two diffrent codes, with one it is working with another it is not.
 
***********************************Working code*******************************
<apex:page standardController="case" rendered="{!(case.Case_Age__c>10 )}" > 

// Where Case_Age__c is a formula field to retrieve date from datetime 

    <script type="text/javascript">
    {
       window.alert("******")
    }
    </script>
</apex:page>

************************************Not Working*****************************
<apex:page standardController="case" >
    <script type="text/javascript">
    {
      window.document.onload = new function(e)
    {
      if({!case.Case_Age__c>10}) 

// when I use some other text field it genrates a alert(example case.status='New')

      {
        alert("**********");
      }
      else
      {
        alert("**********");
      }
    }
</script>

Please help me with this and tell me what am I missing.

Regards,
Ramandeep Singh
Hi Guys,

I need to display a pop up alert window on the logged in manager's screen, when any agent (under the manager) creates or update a case and a pre defined condition is met.

Please provide some help.

Regards,
Ramandeep

 
Hi all,

I am trying to set up demo adpator and after going through all the steps the SalesforceCTI is not working/connecting.
 
The error i am getting in the browser_connector is like:

09/06/2016 13:31:59: SalesforceCTI.exe experienced a problem. Please see BrowserConnector logs for more details.
 Error message: Could not load file or assembly 'Interop.DemoAdapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
 StackTrace:    at BrowserConnector.AdapterConnector.AdapterLink.SetAdapterLink()


Thanks and Regards,
Ramandeep Singh
hi guys,

i am having problem while setting mock responses for my web service.....here is the code....please provide with some solution
 
******************************************code for the web service************************************************************
public String synchronizeAX(String sdfcObjectId,String sfdcObjectName,String companyName,String operationtype,ID stagingStatusId) {
            string xml;
            OAC_AXIntegrate.synchronizeAX_element request_x = new OAC_AXIntegrate.synchronizeAX_element();
            OAC_AXIntegrate.synchronizeAXResponse_element response_x;
            request_x.sdfcObjectId = sdfcObjectId;
            request_x.sfdcObjectName = sfdcObjectName;
            request_x.companyName = companyName;
            request_x.operationtype = operationtype;
            request_x.domain = domain_x;
            request_x.username = username_x;
            request_x.password = password_x;
            Map<String, OAC_AXIntegrate.synchronizeAXResponse_element> response_map_x = new Map<String, OAC_AXIntegrate.synchronizeAXResponse_element>();
            response_map_x.put('response_x', response_x);
            //stagingStatusId = OAC_AXSynchronize.createStagingData(sdfcObjectId,sfdcObjectName,companyName,operationtype); 
                        WebServiceCallout.invoke(
                this,
                request_x,
                response_map_x,
                new String[]{endpoint_x,
                'http://tempuri.org/IAXSdfcService/synchronizeAX',
                'http://tempuri.org/',
                'synchronizeAX',
                'http://tempuri.org/',
                'synchronizeAXResponse',
                'OAC_AXIntegrate.synchronizeAXResponse_element'}
            );
            
            response_x = response_map_x.get('response_x');
                 system.debug('---message----'+response_x);
            
          
           xml = this.getXml(sdfcObjectId,sfdcObjectName,companyName);
           OAC_AXSynchronize.updateStagingData(sdfcObjectId,companyName,sfdcObjectName,stagingStatusId,response_x.synchronizeAXResult,xml);
         return response_x.synchronizeAXResult;
            
            
        }



*********************************​code for the  mock response for web service************************************************
@isTest
global class  mocksyncax implements WebServiceMock {
   global void doInvoke(
           Object stub,
           Object request,
           Map<String, Object> response,
           String endpoint,
           String soapAction,
           String requestName,
           String responseNS,
           String responseName,
           string responseType) {

// Create response element from the autogenerated class.
        OAC_AXIntegrate.synchronizeAXResponse_element reselement   = new  OAC_AXIntegrate.synchronizeAXResponse_element();
//Here createRecordResponse_element is an inner class in generated service class for preparing response
// Populate response element.
       reselement.synchronizeAXResult='welcome';
// Add response element to the response parameter, as follows:
        response.put('response_x', reselement);
   }
      
}


**********************************this is my test class***********************************

@isTest
private class CalloutClassTest {

  
    
     @isTest static void testEchoString() {   
         
         
        
       

      // Test.setMock(WebServiceMock.class, new mocksyncax());
        
        // Call the method that invokes a callout
        
      // string ressyncax = axservice.synchronizeAX('0011700000Po7oaAAB','Account','OA','Insert','a0117000004ynJuAAI');
          
         
        
         

    }
    }
i am getting the following error:
FATAL_ERROR System.TypeException: Collection store exception putting OAC_AXIntegrate.getXMLResponse_element into Map<String,OAC_AXIntegrate.synchronizeAXResponse_element>

please provide with some solution.............



 
Hi all,

I want to know is there any way to get real time location on google maps using vfp??
Lets say, if I change my location the vfp should be updated.
Please provide help.

Thanks and regards,
Ramandeep
Hi all,

I'm trying to display field's data in VF page. Function is like, when selectting the object from picklist which is in vfp the related fields will be displayed in another picklist. On clicking the botton the field's data related to the selected picklist value should be displayed on the Vfp.

Visual Force Page:
<apex:page controller="objectController">
    <apex:form > 
        <apex:pageBlock >
            <apex:pageBlockSection columns="4">
                
                <apex:pageBlockSectionItem >
                    <apex:outputlabel value="Object :"/> 
                    <apex:actionRegion >      
                        <apex:selectList value="{!selectedObject}" size="1">
                            <apex:selectOptions value="{!ObjectNames}"/>
                            <apex:actionSupport event="onchange" rerender="myFields,myFields1"/>
                        </apex:selectList>
                    </apex:actionRegion>                         
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem >
                    <apex:outputlabel value="Field 1"/>   
                    <apex:outputPanel id="myFields">   
                        <apex:actionRegion >  
                            <apex:selectList value="{!selectedField}" size="1">
                                <apex:selectOptions value="{!ObjectFields}"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem >
                    <apex:outputlabel value="Field 2"/>   
                    <apex:outputPanel id="myFields1">   
                        <apex:actionRegion >  
                            <apex:selectList value="{!selectedField2}" size="1">
                                <apex:selectOptions value="{!ObjectFields}"/>
                            </apex:selectList>
                        </apex:actionRegion>      
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:commandButton action="{!output}" value="Select">
                        <apex:actionSupport event="onclick" rerender="mychart"/>
                    </apex:commandButton>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockSection >
                <apex:pageBlockSectionItem >
                    <apex:pageBlockTable value="{!oList}" var="ac">
                        <apex:column value="{!ac['selectedField']}"/>
                        
                    </apex:pageBlockTable>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            
            
        </apex:pageBlock>
    </apex:form>
</apex:page>
ERROR: Invalid field selectedField for SObject Account // On clicking 
Custom Controller:
 
public class objectController
{
    public Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    public List<sObject> oList {get; set;}
    public String selectedObject {get; set;}
    
    public String selectedField {get; set;}
	public String selectedField2 {get; set;}    
    
    
    Public objectController()
    {   
        selectedObject = 'Account';
    }
    
    public List<SelectOption> getObjectNames()
    {
        List<SelectOption> objNames = new List<SelectOption>();
        List<String> entities = new List<String>(schemaMap.keySet());
        entities.sort();
        for(String name : entities)
        {
            objNames.add(new SelectOption(name,name));
        }
        return objNames;
    }
    
    public List<SelectOption> getObjectFields()
    {
        Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
        Schema.SObjectType ObjectSchema = schemaMap.get(selectedObject);
        Map<String, Schema.SObjectField> fieldMap = ObjectSchema.getDescribe().fields.getMap();
        List<SelectOption> fieldNames = new List<SelectOption>();
        for (String fieldName: fieldMap.keySet())
        {
            fieldNames.add(new SelectOption(fieldName,fieldName));
            //fieldMap.get(fieldName).getDescribe().getLabel();//It provides to get the object fields label.
        }
        return fieldNames;
    }
    public List<SelectOption> getObjectFields2()
    {
        Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
        Schema.SObjectType ObjectSchema = schemaMap.get(selectedObject);
        Map<String, Schema.SObjectField> fieldMap = ObjectSchema.getDescribe().fields.getMap();
        List<SelectOption> fieldNames = new List<SelectOption>();
        for (String fieldName: fieldMap.keySet())
        {
            fieldNames.add(new SelectOption(fieldName,fieldName));
            //fieldMap.get(fieldName).getDescribe().getLabel();//It provides to get the object fields label.
        }
        return fieldNames;
    }
    
    public void output()
    {
        system.debug('object'+selectedObject);
        String soqlQuery = 'select '+selectedField+', id, '+selectedField2+' from '+selectedObject;
        system.debug(soqlQuery);
        oList= Database.query(soqlQuery);
        system.debug(olist);
    }
}

Please let me know were am I lacking. It would be really helpful.

Thanks and Regards,
Ramandeep
 
 
Hi all,
I am trying to search news on the bases of account name and in the search box account name is displayed but, on searching there is no news or not even related drop down topic.

Error
*********************************Wrapper Class**********************************
public with sharing class YahooRssWrapper {
    public class channel {
        public String title {get;set;}
        public String link {get;set;}
        public String description {get;set;}
        public String language {get;set;}
        public String category {get;set;}
        public String copyright {get;set;}
        public String pubDate {get;set;}
        public String ttl {get;set;}
        public YahooRssWrapper.image image {get;set;}
        public list<YahooRssWrapper.item> items {get;set;}
        public channel() {
            items = new list<YahooRssWrapper.item>();
        }
    }
     
    public class image {
        public String url {get;set;}
        public String title {get;set;}
        public String link {get;set;}
    }
     
    public class item {
        public String title {get;set;}
        public String guid {get;set;}
        public String link {get;set;}
        public String description {get;set;}
        public String pubDate {get;set;}
        public String source {get;set;}
        public Date getPublishedDate() {
            Date result = (pubDate != null) ? Date.valueOf(pubDate.replace('T', ' ').replace('Z','')) : null;
            return result;
        }
        public DateTime getPublishedDateTime() {
            DateTime result = (pubDate != null) ? DateTime.valueOf(pubDate.replace('T', ' ').replace('Z','')) : null;
            return result;            
        }
    }
     
    public static YahooRssWrapper.channel getRSSData(string feedURL) {
        //Todo Remove
        //feedURL ='http://news.search.yahoo.com/rss?ei=UTF-8&p=Rainmaker&fr=sfp';        
        HttpRequest req = new HttpRequest();
        req.setEndpoint(feedURL);
        req.setMethod('GET');        
        Dom.Document doc = new Dom.Document();
        String xmlDom = '';
        Http h = new Http();
        HttpResponse res; 
        if (!Test.isRunningTest()){ 
            try{
                res = h.send(req);
            }catch(Exception ex){
                return null;
            }
            // Generate the HTTP response as an XML stream          
            if(res.getBody() != null){              
                doc.load(res.getBody().replace('&', EncodingUtil.urlEncode('&','UTF-8')).replace('<![CDATA[','').replace(']]>',''));//res.getBody());
            }            
            
        } else {
            String xmlString = '<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"><channel><title>salesforce.com - Bing News</title><link>http://www.bing.com/news</link><description>Search Results for salesforce.com at Bing.com</description><category>News</category><os:totalResults>3370</os:totalResults><os:startIndex>0</os:startIndex><os:itemsPerPage>10</os:itemsPerPage><os:Query role="request" searchTerms="salesforce.com" /><copyright>These XML results may not be used, reproduced or transmitted in any manner or for any purpose other than rendering Bing results within an RSS aggregator for your personal, non-commercial use. Any other use requires written permission from Microsoft Corporation. By using these results in any manner whatsoever, you agree to be bound by the foregoing restrictions.</copyright><image><url>http://www.bing.com/s/a/rsslogo.gif</url><title>Bing</title><link>http://www.bing.com/news</link></image><docs>http://www.rssboard.org/rss-specification</docs><item><title>Salesforce.com Makes Friends With CIOs - Information Week</title><guid>http://informationweek.com/news/cloud-computing/software/232602782</guid><link>http://informationweek.com/news/cloud-computing/software/232602782</link><description>Parade of CIOs at CloudForce shows how social networking inroads are making Salesforce.com a larger part of the IT infrastructure. Salesforce.com isn&apos;t just for sales forces anymore. Its Chatter app has opened a social networking avenue into the enterprise ...</description><pubDate>2012-03-19T15:21:47Z</pubDate><source>Information Week</source></item></channel></rss>';
            doc.load(xmlString);
        }
         
        Dom.XMLNode rss = doc.getRootElement();
        //first child element of rss feed is always channel
        Dom.XMLNode channel = rss.getChildElements()[0];
         
        YahooRssWrapper.channel result = new YahooRssWrapper.channel();
         
        list<YahooRssWrapper.item> rssItems = new list<YahooRssWrapper.item>();
         
        //for each node inside channel        
        for(Dom.XMLNode elements : channel.getChildElements()) {
            if('title' == elements.getName()) {
                    System.debug(')))))))))))))))))'+elements);
                result.title = elements.getText();
            }
            if('link' == elements.getName()) {
                result.link = elements.getText();
            }
            if('description' == elements.getName()) {
                result.description = elements.getText();
            }
            if('category' == elements.getName()) {
                result.category = elements.getText();
            }
            if('copyright' == elements.getName()) {
                result.copyright = elements.getText();
            }
            if('ttl' == elements.getName()) {
                result.ttl = elements.getText();
            }
            if('image' == elements.getName()) {
                YahooRssWrapper.image img = new YahooRssWrapper.image();
                //for each node inside image
                for(Dom.XMLNode xmlImage : elements.getChildElements()) {
                    if('url' == xmlImage.getName()) {
                        img.url = xmlImage.getText();
                    }
                    if('title' == xmlImage.getName()) {
                        img.title = xmlImage.getText();
                    }
                    if('link' == xmlImage.getName()) {
                        img.link = xmlImage.getText();
                    }
                }
                result.image = img;
            }
             
            if('item' == elements.getName()) {
                YahooRssWrapper.item rssItem = new YahooRssWrapper.item();
                //for each node inside item
                for(Dom.XMLNode xmlItem : elements.getChildElements()) {                    
                    if('title' == xmlItem.getName()) {
                        rssItem.title = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                    if('guid' == xmlItem.getName()) {
                        rssItem.guid = xmlItem.getText();
                    }
                    if('link' == xmlItem.getName()) {
                        rssItem.link = xmlItem.getText();
                    }
                    if('description' == xmlItem.getName()) {
                        rssItem.description = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                    if('pubDate' == xmlItem.getName()) {
                        rssItem.pubDate = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                    if('source' == xmlItem.getName()) {
                        rssItem.source = EncodingUtil.urlDecode(xmlItem.getText(),'UTF-8');
                    }
                }
                //for each item, add to rssItem list
                rssItems.add(rssItem);
            }
        }
        //finish YahooRssWrapper.channel object by adding the list of all rss items
        result.items = rssItems;        
        return result;
    }
     
}
***********************************************************************************

*************************************Class****************************************
public with sharing class RSSNewsReader { 
    public String rssQuery {get;set;}
    public boolean recordNotFound{get;set;}
    public String age{get;set;}     
    public YahooRssWrapper.channel rssFeed {get;set;}
    
    public RSSNewsReader(ApexPages.StandardController controller) {
        age = apexpages.currentpage().getparameters().get('age');
        String query = apexpages.currentpage().getparameters().get('q');
        if(age == null || age.trim().equals('')){
            age = '';
        }
        if(query == null || query.trim().equals('')){
                Account objAcc = [SELECT Name FROM Account WHERE Id=:controller.getRecord().Id ];
            rssQuery = ObjAcc.Name;//default on load
        } else{
            rssQuery = query;
            system.debug('@@@@@@' + rssQuery);
        }       
        init('http://news.search.yahoo.com/rss?p='+EncodingUtil.urlEncode(rssQuery,'UTF-8')+'&fr=sfp&age=' + age.trim());
    }


    private void init(String rssURL) {
        try{
            recordNotFound = true;
            rssFeed = YahooRssWrapper.getRSSData(rssURL);            
        }catch(Exception ex){
            recordNotFound = false;
        }
    }
    
     public pagereference getRSSFeed2() {  
        apexpages.currentpage().getparameters().put('q',rssQuery);      
        init('http://news.search.yahoo.com/rss?p='+EncodingUtil.urlEncode(rssQuery,'UTF-8')+'&fr=sfp&age=' + age.trim());        
        return null;
     }
}
************************************************************************************

*********************************Visualforcepage**********************************
<apex:page standardController="Account" showHeader="false" sidebar="false" extensions="RSSNewsReader">
<style type="text/css">
    body {
    font: 13px/1.231 arial,helvetica,clean,sans-serif;
    }

    #results .yschttl, #yschiy .yschttl {
    font-size: 123.1%;
    }

    #web h3 {
    font-weight: normal;
    }

    #results .res {
    margin-bottom: 17px;
    }

    .res {
    position: relative;
    }

    #web ol li a.yschttl:link, #web li .active a:link {
    color: #0000DE;
    }

    li {
    list-style: none;
    }

    #web .res .url {
    color: #A0A0A0;
    }

    #web .url, .yschurl {
    color: green;
    font-weight: bold;
    }

    h1 {
        border-bottom: 2px solid threedlightshadow;
        font-size: 160%;
        margin: 0 0 0.2em;
    }


    #feedSubtitleText {
        color: threeddarkshadow;
        font-size: 110%;
        font-weight: normal;
        margin: 0 0 0.6em;
    }

    .msg {
    background: #FEFBDD;
    margin-left: 128px;
    margin-right: 5px;
    padding: 9px;
    word-wrap: break-word;
    font-size: 16px;
    margin-bottom: 16px;
    padding-left: 11px;
    }
    #left-panel ul{list-syle:none}
    #left-panel ul li{padding:2px; margin:0;list-style:none;display:block;clear:left}
    #logo {
    height: 37px;
    left: -2px;
    margin-top: 0px;
    position: absolute;
    top: 1px;
    width: 168px;
    background-image: url(http://l.yimg.com/pv/i/all/vertical/news/us_srp_metro_news_201301281307.png);
    background-size: 80%;
    background-repeat: no-repeat;
    }
    .listHeading{
    color: #949FA6;
        font-size: 13px;
        font-weight: 400;
        margin: 0 0 3px 8px;
        text-transform: uppercase;
    }
    .listItems{
        margin: 0;
        padding: 5px 0;    
    }
    .listItems a{
        color: #1A4B8E;
        text-decoration: none;
        white-space: nowrap;    
    }

    #anyTime{
        color:{!IF($CurrentPage.parameters.age == '','black !important','#1A4B8E')};
    }
    #d1{
        color:{!IF($CurrentPage.parameters.age == '1d','black !important','#1A4B8E')};
    }
    #h1{
        color:{!IF($CurrentPage.parameters.age == '1h','black !important','#1A4B8E')};
    }
    #h1{
        color:{!IF($CurrentPage.parameters.age == '1w','black !important','#1A4B8E')};
    }
</style>
<apex:form id="yahooFormId">
<div>
    <div id="left-panel" style="width:9.9%; float:left;">
    <span id="logo"></span>        
        <ul style="margin:58px 0 0 10px; padding:2px 0;">
            <li class="listHeading">Filter by Time</li> 
            <li class="listItems"><a href="/apex/yahooRSSFeed?q={!rssQuery}&age=" id="anyTime">Any time</a></li>
            <li class="listItems"><a href="/apex/yahooRSSFeed?age=1h&q={!rssQuery}" id="h1">Past hour</a></li>
            <li class="listItems"><a href="/apex/yahooRSSFeed?age=1d&q={!rssQuery}" id="d1">Past day</a></li>
            <li class="listItems"><a href="/apex/yahooRSSFeed?age=1w&q={!rssQuery}" id="w2">Past week</a></li>        
        </ul>
    </div>
    <div id="results" style="width:90%; float:left; ">
        <div id="feedTitleContainer" style="margin-left: 58px;">
           <apex:inputText style="border-color: #929292 #D5D5D5 #D5D5D5 #929292;border-style: solid;border-width: 1px; height: 18px;
                padding: 3px 10px;width: 534px;" value="{!rssQuery}"/> 
           <apex:commandButton style="background: #FDCE3E;border: 1px solid #E5A716;color: #434343;height: 26px;margin-left: 7px;
                padding: 0 23px;font-size: 15px; font-weight: bold;" action="{!getRSSFeed2}" value="Search" reRender="yahooFormId"/>          
        </div>
        <div id="web" style="border-left:solid 1px #ccc;">
            <ol start="0">
                <apex:repeat value="{!rssFeed.items}" var="n">
                    <li>
                        <div class="res">
                            <div>
                                <h3>
                                    <a class="yschttl spt" href="{!n.link}">                                 
                                        <apex:outputText value="{!n.title}" escape="false"/> 
                                    </a>
                                </h3>
                            </div>
                    
                            <div class="abstr">
                                <apex:outputText value="{!n.Description}" escape="false"/>
                            </div>
                    
                            <span class="url">
                                <apex:outputText value="{!n.source} {!n.pubDate}" escape="false"/>
                            </span>
                        </div>
                    </li>
                </apex:repeat>
            </ol>    
        </div>
    </div>
</div>
<apex:outputPanel rendered="{!IF(OR(!recordNotFound, rssFeed.items == null, rssFeed.items.size == 0),true,false)}">
    <ol start="0">
        <li>
            <p class="msg zrpmsg">We did not find results for: <b>{!rssQuery}</b> <strong> </strong>. Try the suggestions below or type a new query above.</p>      
        </li>
    </ol>
</apex:outputPanel>
</apex:form>
</apex:page>

Please anyone help me out of this. It will be really grateful.

Thanks and Regards,
Ramandeep
Hi all,

I want to display news feed from external source using visualforce. I tried using javascript and some sample codes yet no output.

Please provide some help. If possible, with code. It will be really helpul.

Thanks and Regards
Ramandeep 
Hi Guys,

I am trying to pop up a alert window when there is any change in the desired case field.
And then looked to online solution and got two diffrent codes, with one it is working with another it is not.
 
***********************************Working code*******************************
<apex:page standardController="case" rendered="{!(case.Case_Age__c>10 )}" > 

// Where Case_Age__c is a formula field to retrieve date from datetime 

    <script type="text/javascript">
    {
       window.alert("******")
    }
    </script>
</apex:page>

************************************Not Working*****************************
<apex:page standardController="case" >
    <script type="text/javascript">
    {
      window.document.onload = new function(e)
    {
      if({!case.Case_Age__c>10}) 

// when I use some other text field it genrates a alert(example case.status='New')

      {
        alert("**********");
      }
      else
      {
        alert("**********");
      }
    }
</script>

Please help me with this and tell me what am I missing.

Regards,
Ramandeep Singh
Hi Guys,

I need to display a pop up alert window on the logged in manager's screen, when any agent (under the manager) creates or update a case and a pre defined condition is met.

Please provide some help.

Regards,
Ramandeep

 
Hi all,

I am trying to set up demo adpator and after going through all the steps the SalesforceCTI is not working/connecting.
 
The error i am getting in the browser_connector is like:

09/06/2016 13:31:59: SalesforceCTI.exe experienced a problem. Please see BrowserConnector logs for more details.
 Error message: Could not load file or assembly 'Interop.DemoAdapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
 StackTrace:    at BrowserConnector.AdapterConnector.AdapterLink.SetAdapterLink()


Thanks and Regards,
Ramandeep Singh