• hatti
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Hi,

I have a hyperlink formula field("www.salesforce.com","Click here") and field name is Link__c. when i query this field through system.debug or api, i get the value as ' <a href="www.salesforce.com" target=""/>Click here</a> ' . Can anyone help me in querying only for 'www.salesforce.com'.

  • March 13, 2012
  • Like
  • 0

HI, I need to pass a list of wrapper class as the parameter to a webservice method in salesforce in ajax/javascript using sforce.apex.execute. How do i do it. Any help would be greatly appreciated.

  • September 09, 2011
  • Like
  • 0

hi ,

     I am new to salesforce developement, i want to make my work more attractive using flex UI,   but i am not finding good example how to get my custom object text field data into the flex grid which i want to embed into vf page. Please help me by givin examples with comments , since i am just a begginer to developement, i may not be able to understnd it without more technical help. Thanking you a lot in advance.

  • September 12, 2009
  • Like
  • 0

Hi,

I have a hyperlink formula field("www.salesforce.com","Click here") and field name is Link__c. when i query this field through system.debug or api, i get the value as ' <a href="www.salesforce.com" target=""/>Click here</a> ' . Can anyone help me in querying only for 'www.salesforce.com'.

  • March 13, 2012
  • Like
  • 0

Hi friends,


I have created a managed package for my application JS and uploaded its first version JS 1.0 (Developer,AppExchange),
earlier i had given my application for scan to SOURCE CODE SCANNER, and they respond back with "no issues".

then i had submitted my application for Security review  (fom appexchange),done all the formalities,
after three weeks salesforce respond with a mail which shows failure of application because of one vulnerabilities,that is :

 1)MIXED CONTENT VULNERABILITY

for this line
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
 </script>


and for highlighted lines

function showMessage(event, jsEvent, view)
    {
        document.getElementById("NoticeDiv_"+event.id).style.left = jsEvent.pageX+'px';+'px';
        document.getElementById("NoticeDiv_"+event.id).style.top = jsEvent.pageY+'px';
        document.getElementById("NoticeDiv_"+event.id).innerHTML = '<div id="TitleBar_'+event.id+'" class="drsMoveHandle">'+event.title+'<img src="http://images.fpitesters.com/shared/application_close_fade.png" id="closeButton_'+event.id+'" name="closeButton_'+event.id+'" onmouseover=\'javascript&colon;roll_over("closeButton_'+event.id+'", "http://images.fpitesters.com/shared/application_close.png");\' onmouseout= \'javascript&colon;roll_over("closeButton_'+event.id+'", "http://images.fpitesters.com/shared/application_close_fade.png");\' onClick="javascript&colon;hideMessage(\''+event.id+'\');" ></div> \
                                                          Staff: '+event.staff+'<br>'
          $("#NoticeDiv_"+event.id).slideDown('fast', function()
          {
          });   
 }



could anyone please help me how to fix this issue.

I think i should use static resource instead of url.

please correct me.




Thanks,
Amit Singh

HI, I need to pass a list of wrapper class as the parameter to a webservice method in salesforce in ajax/javascript using sforce.apex.execute. How do i do it. Any help would be greatly appreciated.

  • September 09, 2011
  • Like
  • 0

Hi All,

Firstly, thanks for taking the time to look at my post.

I have  vf page that was working very nicely until recently (maybe until spring '11 was launched?). Now, when the user fires an event that calls an actionFunction, the apex method is not being called. I put an actionStatus component into the page to show the status, and it does show the start and stop text, but the debug log shows output appropriate for pageload, not for the method referenced in the actionFunction tag.

Action Function Tag:

 

<apex:actionFunction status="counterStatus" name="renderField" action="{!renderField}" immediate='true' rerender="taskInfoDisplay, descInfo,fundraisingInfo, sysInfo, editButtons">
  <apex:param name="fieldToShow" value=""/>
  </apex:actionFunction>

 

 

Apex Method:

 

public void renderField(){
		System.debug('in renderField');
		fieldToEdit = ApexPages.currentPage().getParameters().get('fieldToShow');
		isEdit = true;
		System.debug('the field to edit is: ' + fieldToEdit);
	}

 

 

Sample Calling Code:

 

<apex:outputLabel ondblclick="renderField('Priority')"  value="Priority"/>

 

 

Does anyone have any ideas as to why this would no longer work?

 

Thanks!

 

  • March 13, 2011
  • Like
  • 0

Hi friends ,

 

 I have implemented a search functionality which searches records more than 100000.

The following are the challenges I am facing , please advice

 

1)Even though the query limit is 10000, If the result number exceeds over 1000 I am getting an error maximum retrieve id limit reached. (think it might be limitation with VFP )

2) because of the large recor numnber , the search performance was pretty slow. I dont know much ways to improve the search , thought of using SOSL but it will return only 200 records at a time.

IS there any thing like indexing for salesforce

 

 

 

 

 

 

  • March 10, 2011
  • Like
  • 0

I have developed a VF page that I would like to frame into a standard html page on a webserver.  If I am logged into SF in another tab, everything works great.... but if I logout and try to go directly to my page with the iFrame... I get a blank white box with this source:

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
    <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> 
 
 
 
 
 
<script> 
var escapedHash = '';
var url = 'https://login.salesforce.com/?ec=302&startURL=%2Fvisualforce%2Fsession%3Furl%3Dhttps%253A%252F%252Fc.na7.visual.force.com%252Fapex%252FChatter_Page';
if (window.location.hash) {
   escapedHash = '%23' + window.location.hash.slice(1);
}
if (window.location.replace){ 
window.location.replace(url + escapedHash);
} else {;
window.location.href = url + escapedHash;
} 
</script> 
 
</head> 
 
 
</html> 

 

Which makes it look like the login page should be appearing.  Also, if I paste the URL variable into my browser, everything works fine.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When I am using


 

 

<apex:selectRadio id="slctRd" dir="ltr" required="true" layout="pageDirection" value="{!selectedValue}" immediate="true" onclick="alert('hi);">
<apex:selectOptions id="selRdOptn" value="{!Options}"/>
</apex:selectRadio>

 

 

 

. The label is appearing before the radio button is it by default? I did not find any option to change the Radio button from Extreme right orientation to extreme left orientation.

 

- Samarthya

public void parseXML(XmlStreamReader xsr)
    {
       
        while(xsr.hasNext())
        {
            if (xsr.getEventType() == XmlTag.START_ELEMENT)
            {   
                if ('body' == xsr.getLocalName())
                {   
                    m_xmlValue += '-' + '   ' + parseRoot(xsr);
                   // parseRoot(xsr);
                }
            }   
               xsr.next();
        }
       
    }
    public String parseRoot(XmlStreamReader xsr)
    {
        String value ='';
       
        value += '---> ' + xsr.getAttributeValue('', 'chapter');
        System.debug('The value of chapter is ::'+value);
       
        while(xsr.hasNext())
        {
            if (xsr.getEventType() == XmlTag.END_ELEMENT)
            {
                   break;
            }
            else if (xsr.getEventType() == XmlTag.CHARACTERS)
            {
                   value += xsr.getText();
            }
            xsr.next();
         }
       
        return value;
    }
    public TestGoogleAppController()
    {      
        try
        {    
            //TestGoogleAppController tstGoogleApp = new TestGoogleAppController();
            m_xmlValue = '';
            //Playing with XML
            //String xml = '<root><body chapter="1">Hello Peace</body><body chapter="2">Sumiran</body><body chapter="3">How</body></root>';
            String xml = '<body chapter="1">Hello Peace</body>';
            XmlStreamReader xsr = new XmlStreamReader(xml); 
            parseXML(xsr);

}

}

 

 

Guys, I have been stuck on this problem since morning.So please help out.

 

I am try to read the xml.I can read the values present between tags but I get "null" while reading attributes.Please could you point me in the right direction

 

HI, I implemented the method to pass parameters from SControl to SFDC.

Still I am facing error. My web service is:

global class DTCTest1 {
global class StatusDetail{
webservice String Zip;
webservice String Occupancy;
webservice String Property;
webservice String Grade;
webservice String MaxLoan; }
WebService static String DTC(StatusDetail sd) {
 ZIP_Status_Mapping__c Zsp=[select Status__C from ZIP_Status_Mapping__c where Name =: sd.Zip];
String Cltv=[select Max_CLTV__c from Status_Details__c where ((Occupancy_Type__c =: sd.Occupancy) and (Property_Type__c =: sd.Property) and (Credit_Grade__c =: sd.Grade) and (Max_Loan_Line__c =: sd.MaxLoan)and (Market__C =: Zsp.Status__C))].Max_CLTV__c;
return Cltv;
}

My scontrol has following section.
 
var nr = new sforce.Xml("StatusDetail");
nr.zip = '{!TestScreen__c.Zip__c}';
nr.oc= '{!TestScreen__c.Occupancy__c}';
nr.pro= '{!TestScreen__c.Property__c}';
nr.gra= '{!TestScreen__c.Grade__c}';
nr.max= '{!TestScreen__c.Maxloan__c}';
var result = sforce.apex.execute('DTCTest1' ,'DTC',{sd:nr });
 
I am facin error in retrieving the result. Seems I am not able to send the parameters. Kindly help on this.
 
Thanks in Advance
I've seen examples demonstrating how to invoke an Apex Web Service from inside the Ajax toolkit, but these only show simple parameter types

result = sforce.apex.execute('MyClass' ,'methodX',{role:"User", firstname "Joe", lastname "Test");

But what how do you pass complex parameters to the Web Service???

For sake of example, lets say you have the following Apex Class Definitions:

global class MyClass {
    WebService static String methodX(String role, ContactX contact) {
        return (role + ': '+ contact.firstname + ' ' + contact.lastname);   
    }
}


and

global class ContactX {
    public String firstname;
    public String lastname;
}



How would you invoke methodX, passing in an instance of the ContactX class?   I tried the following approaches - but had no luck ...

    result = sforce.apex.execute('MyClass' ,'methodX',{role:"User", contact:{firstname:"Joe", lastname:"Test"} });

    // null values for firstname and lastname are returned


and

    var newcontact = new sforce.Xml("ContactX");
    newcontact.firstname = "Joe";
    newcontact.lastname = "Test":
    result = sforce.apex.execute('MyClass' ,'methodX',{role:"User", contact:newcontact });

    //  soapenv:Client ->  There is no public member called 'firstname' in the Apex class 'ContactX'

Any suggestions?

Thanks,