• pcraft
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies

Like the title says, I just (well, last night) installed the latest version of the Force.com IDE on my Mac running OS X 10.8. After the installation completed it auto opened on it's own and I set about to do what I needed to do. Then I closed it down and went to bed. Now, I'm trying to open it again, but the only shortcuts I'm finding are the uninstallers and the Pulse installer.

 

Do I have to reinstall the IDE again just to continue working and will I have to repeat the process each time I close the application, or is there a way to get to the IDE?

  • August 28, 2012
  • Like
  • 0

I have a .NET service I'm building to give me access to the data in Salesforce. I'm trying to get my update method(s) to work. Specifically, I need to know how to clear the value of a field in Salesforce. I presumed that since we're using JSON to pass the data back and forth that I can just set the field to null in the JSON string and Salesforce will clear the current value. That appears to not be the case, or I'm just plain dumb. For example if I post {"Invoice__c":"blah blah blah"} it works fine. But if I post {"Invoice__c":null,"Finish_Date__c":null,"Scheduled_Date_Time__c":"\/Date(1333526400000)\/","Walk_Date_Time__c":null} nothing happens. I don't even get an error message back. It simply doesn't work.

 

Am I doing something wrong (I obviously must be doing something wrong)? How do I correct this?

 

Thanks in advance for any help!

Hi all, I have a VF Page with the following code:

 

<apex:page standardController="Account" extensions="AttachmentsController">
    <apex:iframe height="200" scrolling="true" src="http://example.com/Salesforce/[USER_ID]/Attachments/Account/{!account.Id}" />
</apex:page>

I want to be able to pass the User Id where it says [USER_ID]. In my AttachmentsController I have a property called userId, but when I try to reference it with {!userId} it won't let me save saying it's not a valid property of the AccountStandardController. How can I get around this issue and pass the User Id into the URL?

  • April 20, 2012
  • Like
  • 0

I'm new to apex and was trying to use the zillow mashup posted here http://wiki.apexdevnet.com/index.php/Force.com_Zillow_Mashup
I have everything working, but I can't figure out how to get the test 75+% of the code. Currently it's at 44%

Code:
public class ZillowService {
 
 public String serviceName {get ; private set ; }
 
 public ZillowService( String serviceName ){
  this.serviceName = serviceName ;
 }
 
 public ZillowService() {
 }
 
 public ZillowTypes.PropertySearchResponse searchZillow( String street, String City, String state, String zip ){
    
  return searchZillow( street, city+ ' ' + state + ' ' + zip ) ;
 }
 
 public ZillowTypes.PropertySearchResponse searchZillow( String street, String City, String state ){
    
  return searchZillow( street, city+ ' ' + state ) ;
 }
 
 
 public ZillowTypes.PropertySearchResponse searchZillow( String address, String citystatezip ){
  // construct the URL  
  String endpointURL = ZillowConfig.PROPERTY_SEARCH_URL + ZillowConfig.ZWSID + '&address=' +  EncodingUtil.urlEncode(address, 'UTF-8') + '&citystatezip=' + EncodingUtil.urlEncode(citystatezip, 'UTF-8') ;      
  ZillowTypes.PropertySearchResponse searchResponse = null ;  
  try{   
   HttpResponse response = invokeZillow( 'GET', endpointURL ) ;
   XMLDom responseXML = new XMLDom( response.getBody() ) ;
   String code = responseXML.getElementByTagName('code').nodeValue ;
   if( code == ZillowTypes.CODE_SUCCESS){
    searchResponse = new ZillowTypes.PropertySearchResponse( responseXML.getElementByTagName('response') ) ;
   }
   else{
    throw new ZillowTypes.ZillowException( 'Error in Zillow response - code = '+code +' Description : ' +ZillowTypes.PropertySearchResponseCode.get(code) ); 
   }
  }
  catch( System.Exception e){
   System.debug( 'Error ' +e) ;
   throw e ;
  } 
  
  return searchResponse ;
  
 }
 
 // Web service call out 
 private HttpResponse invokeZillow( String method, String url ){    
     HttpRequest  req = new HttpRequest();   
  HttpResponse response = null;
  try {
   if( method != 'GET' ){
    throw new ZillowTypes.ZillowException('ZillowService::invokeZillow - only GET supported  '+method +' is not supported') ;
   } 
      req.setEndpoint(url); 
      req.setMethod(method) ;
   Http http = new Http();
   response = http.send(req);
  }
  catch( System.Exception e){   
    throw new ZillowTypes.ZillowException('Error sending HTTP message - ERROR: '+ e) ;
  }     
  if (response.getStatusCode() != 200) { 
   throw  new ZillowTypes.ZillowException('Error in HTTP Response - STATUS: ' +response.getStatus() + 'STATUS_CODE:'+ response.getStatusCode()) ; 
  }    
     return response ;
 }
 
 public static testmethod void basicTest() {
  try{
   ZillowService p = new ZillowService() ;
   ZillowTypes.PropertySearchResponse r = p.searchZillow( '2114 Bigelow Ave', 'Seattle, WA') ;
   Double d = r.getZEstimateAmount() ;
   String sf = r.getZSQFT() ;
   String y = r.getZYearOfHome() ;
   System.debug( '**** HOME VALUATION RETURNED = ' +d ) ;
  }
  catch( ZillowTypes.ZillowException e){
   System.debug( '**** Caught Exception' +e ) ;
  }
 }
 
}

/*****use this fragment to test from IDE or debugger


try{
ZillowService p = new ZillowService() ;
ZillowTypes.PropertySearchResponse r = p.searchZillow( '2114 Bigelow Ave', 'Seattle, WA') ;
Double d = r.getZEstimateAmount() ;
System.debug( '**** HOME VALUATION RETURNED = ' +d ) ;
}
catch( ZillowTypes.ZillowException e){
System.debug( '**** Caught Exception' +e ) ;
}
***********/


 

  • November 24, 2008
  • Like
  • 0

Hi all, I have a VF Page with the following code:

 

<apex:page standardController="Account" extensions="AttachmentsController">
    <apex:iframe height="200" scrolling="true" src="http://example.com/Salesforce/[USER_ID]/Attachments/Account/{!account.Id}" />
</apex:page>

I want to be able to pass the User Id where it says [USER_ID]. In my AttachmentsController I have a property called userId, but when I try to reference it with {!userId} it won't let me save saying it's not a valid property of the AccountStandardController. How can I get around this issue and pass the User Id into the URL?

  • April 20, 2012
  • Like
  • 0