• Ron Wild
  • NEWBIE
  • 365 Points
  • Member since 2006

  • Chatter
    Feed
  • 11
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 66
    Questions
  • 207
    Replies

I am trying to insert a FeedPost on a Contact when I add a new related record, and I'm using the code from the Chatter Code Recipes to insert a FeedPost:

 

 

FeedPost fpost = new FeedPost();
fpost.ParentId = oId; //eg. Opportunity id, custom object id..
fpost.Body = post;
insert fpost;

 

 

I replaced oId with the associated Contact.Id, but the error is occurring on the previous line: Save error : Invalid type : FeedPost

 

This is my Chatter dev org, so I know it's enabled - is there something else that I need to add when I'm working from a trigger?

After trying to execute the "webServiceName" web service below, I get this error:

ERROR: ........... {faultcode:'soapenv:Client', faultstring:'No service available for class 'MyClass'', }

 

Here's my button code:

 

{!requireScript("/soap/ajax/16.0/connection.js")}
{!requireScript("/soap/ajax/16.0/apex.js")}

var args = {
objId:'{!MasterObject__c.Id}',
childIds:{!GETRECORDIDS($ObjectType.ChildObject__c)}
};

function callback(result) { location.href=result.pagereference; }

var result = sforce.apex.execute('MyClass', 'webServiceName', args, callback);

 

 

 

Here's my service code:

 

global with sharing class MyClass
webservice static wsResult webServiceName(String objId, String[] childIds) {
// Do stuff...

wsResult result = new wsResult();
result.pagereference = pr.getUrl();
result.success = true;
result.errorCode = 0;
result.errorMsg = '';
return result;
}

global class wsResult {
webservice string pagereference;
webservice boolean success;
webservice Integer errorCode;
webservice String errorMsg;

public wsResult() {}

public wsResult(string url, boolean result, Integer code, String msg) {
this.pagereference = url;
this.success = result;
this.errorCode = code;
this.errorMsg = msg;
}
}

 

 I looked in my Enterprise WSDL, and couldn't find my service -- but I'm a complete novice with WSDLs...

 

 

 Thanks in advance!

Hi

 

I have a Contact in my Salesforce org. and have an Attachment (a PDF file) associated to that Contact.

 

Is it possible to download this PDF file from a Site Page?

 

I am able to query and Display the name of the file on my Site page, but want to know if there's a way to download the file.

 

Thanks,

 

Suri

  • June 05, 2009
  • Like
  • 0

<apex:column headerValue="Amount(K)">
<apex:outputLabel dir="LTR" value="${!ROUND(opp.Amount/1000, 2)}" />
</apex:column>

 

 

I have above in my visualforce page. I sometimes see $3E+1 in amount column.

 

Is ther any way to convert text to currency format in visualforce.

 

<apex:column value="{!opp.Amount}"/> works perfectly. But I want to display amount in thousands and in proper currency format (possibly right aligned with always two digits after decimal point).

 

 

 

Thanks,

Deepak

 

 

Hi All,
Can anybody tell, how to call, the javascript onload() function in the <body> in a javascript. I wanted to call an alert statement, through a javascript on the onload function. Please help. Below is the code for reference:
 
<apex:page>
  
    <script type="text/javascript" src="/js/functions.js"></script>
    <script src="/soap/ajax/11.1/connection.js"></script>
    
<apex:pageBlock>
<apex:form>
  
<body onload="init();">       
<table width="100%">
<tr>
<td>
  <input type="text" id="txtName" />
  <input type="button" value="Save"  />
 
</td>
</tr>
</table>
</body>
 <script language="javascript">
sforce.connection.sessionId = '{!$Api.Session_ID}';
function init()
{
  alert('hi');
}
 </script>

  </apex:form>
</apex:pageBlock>
</apex:page>
  • December 26, 2008
  • Like
  • 0

I don't know what is wrong with this wsdl? when I click Parse WSDL, it gives that error message, can anyone help me fix the file?
Thanks
the original code is posted below
 
 
Code:
<—xml version="1.0" encoding="utf-8"–>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="SForceLogin">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UID" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Pwd" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="SForceLoginResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="SForceLoginResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Query">
        <s:complexType />
      </s:element>
      <s:element name="QueryResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="QueryResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="SForceLoginSoapIn">
    <wsdl:part name="parameters" element="tns:SForceLogin" />
  </wsdl:message>
  <wsdl:message name="SForceLoginSoapOut">
    <wsdl:part name="parameters" element="tns:SForceLoginResponse" />
  </wsdl:message>
  <wsdl:message name="QuerySoapIn">
    <wsdl:part name="parameters" element="tns:Query" />
  </wsdl:message>
  <wsdl:message name="QuerySoapOut">
    <wsdl:part name="parameters" element="tns:QueryResponse" />
  </wsdl:message>
  <wsdl:portType name="ServiceSoap">
    <wsdl:operation name="SForceLogin">
      <wsdl:input message="tns:SForceLoginSoapIn" />
      <wsdl:output message="tns:SForceLoginSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Query">
      <wsdl:input message="tns:QuerySoapIn" />
      <wsdl:output message="tns:QuerySoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="SForceLogin">
      <soap:operation soapAction="http://tempuri.org/SForceLogin" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Query">
      <soap:operation soapAction="http://tempuri.org/Query" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="SForceLogin">
      <soap12:operation soapAction="http://tempuri.org/SForceLogin" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Query">
      <soap12:operation soapAction="http://tempuri.org/Query" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service">
    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
      <soap:address location="http://localhost:1908/Salesforce_Origination/Service.asmx" />
    </wsdl:port>
    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
      <soap12:address location="http://localhost:1908/Salesforce_Origination/Service.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

 
I have a relatively simple S-control that is manifesting some bizarre problems I can't easily reproduce. The only thing I get is a message from Salesforce:
 Invalid Page Redirection
    The page you attempted to access has been blocked due to an outside website or an improperly coded link or button. Please contact your Salesforce Administrator for assistance.

  Click here to return to the previous page.

The only thing I can think of is that there is something wrong with the JS I pulled off the web to process out the retUrl parameter from the URL my S-control is fed.

Code:
//function to decode given URL
function decodeUrl(url)
{
   /* When decoding the URL we will do the following:

           1.) Replace + with ' '
           2.) Replace %xx with equivalent character
           3.) Put [—] in output if %xx is invalid.
   */

   //string holding our hexadecimal values
   var hexValues = "0123456789ABCDEFabcdef"; 
   //value to hold the initial URL value
   //variable to hold the final URL value
   var returnURL = "";
   //counter variable
   var count = 0;
   plainUrl = url;
   //start looping through each character in the URL
   while (count < plainUrl.length) 
   {
      //get each character on each iteration
      var charValue = plainUrl.charAt(count);
      //determine the value of the character
      switch(charValue)
      {
         //if the character is a plus sign (+) then append a space
         case "+":
             returnURL += " ";
             //increment our counter
             count++;
             break;
         //if the character is a percent sign we have a little more work to do
         case "%":
             //first determine if we have a valid character (one that is in our list)
             if (count < (plainUrl.length - 2) && hexValues.indexOf(plainUrl.charAt(count+1)) != -1 && hexValues.indexOf(plainUrl.charAt(count + 2)) != -1 ) 
             {
                 //its a valid character so unescape it
          returnURL += unescape(plainUrl.substr(count,3));
                 //increment the counter by 3
          count += 3;
      } 
             else 
             {
          //we have a bad character so append [–]
          returnURL += "%[˜]";
          count++;
             }
             break;
         default:
             //default value is to append the current character
             //to the return value
             returnURL += charValue;
             count++;
             break;
      }
    }
   //return the final decoded URL
   return returnURL;
}

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\™&]"+name+"=([%^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( decodeUrl(window.parent.location.href) );
  var result = decodeUrl(window.parent.location.href).substr(results.index+8,24);
  if( results == null )
    return "";
  else
    return result;
}


 And the actual call is: window.opener.location.href = "https://na1.salesforce.com/"+gup("retURL");

  • October 22, 2008
  • Like
  • 0
Folks,
I have a requirements to interface with PayPal from salesforce.com. There were some discussion threads on a Theikos app-exchange product but looks like that product is not there anymore. Any helps from people who have implement such requirements would be useful.



Thanks,
A B
It's super easy to call an apex webservice method from the ajax toolkit, since it very helpfully provides the sforce.apex.execute method.

I assumed there would be something equivalent in the flex toolkit, but I can't find anything, and then stumbled across this thread from a few months ago:
http://community.salesforce.com/sforce/board/message?board.id=apex&thread.id=518

Is this still the state of affairs?  If so, sounds like not only is it not easy to call an apex method from flex, but no-one has yet figured out how to do it.  (or at least hasn't figured it out and then replied to the forums.)

Seems like that can't be right, but I can't find anything anywhere (forums, docs, object structure within flex builder, etc.) to suggest otherwise.

Is anyone calling apex webservice methods from Flex, and if so, how?

Thanks much!





  • December 02, 2007
  • Like
  • 0

Does anyone know if/when support for dynamic visualforce will be generally available?  Is it coming out in the Winder '12 release?

 

Thanks,

Ron

 

We're seeing some odd behavior in the Force.com IDE and in the Salesforce UI when viewing apex test coverage results...

 

In the SF UI, comments, system.debug and even portions of parameters lists are being displayed with a red highlight - indicated no test coverage.

 

And in the IDE, we're seeing 100% coverage results for all classes ....even though we know that's not the case.

 

Has anyone else come across this?

 

- Ron

Contrary to what I was reading in the documentation,  it appears that if you are using an Authenticated Website user license for a Sites portal user, that user does not have access to custom objects if there is a master-detail lookup from the custom object to the Contact object .... even if the Contact is the contact associated with the login. 

 

Can anyone confirm this for us?  

 

The online documentation (search "Granting High-Volume Customer Portal Users Access to Objects") states:

 

Access to Records

High-volume portal users can access records if any of the following conditions are met:
  • They own the record
  • They can access a record's parent, and the organization-wide sharing setting for that record is Controlled by Parent
  • The organization-wide sharing setting for the object is Public Read Only or Public Read/Write
  • The record is the account or contact under which they are enabled (read access only)

 

However when I configure a custom Auth Website profile, these objects cannot be checked (or enabled).  And my tests in Sites result in errors or missing field values when I access the objects.

 

High-volume customer portal licenses however appear to have access, but these I think aren't priced as low for SF customers, so we have to assume that most of our customers will be buying the Auth. Website user licenses for Sites implementations.

 

Thanks,

Ron

I've discovered that we can't delete Protected Custom Settings from a Managed Package.   If it's protected, and thus inaccessible to custom code and other applications, shouldn't we be able to?

 

- Ron

 

I've been trying to MacGyver a way to hide an apex:repeat block if no items are found in the repeat list but haven't figured out a way to do it.

 

Ideally, there would be a COUNT() function that could be used to make rendering of an apex:outputPanel or other tag conditional.  e.g. render="{!COUNT(list)>0}" but such a function doesn't exist yet  (Vote for my idea here: https://sites.secure.force.com/success/ideaView?c=09a30000000D9xtAAC&id=08730000000KX2uAAG )

 

The function would be used as follows:

 

 

<apex:outputPanel rendered="{!COUNT(contact.related_items__r)>0}" >

<h2>List Heading</h2>
<apex:repeat value="{!contact.related_items__r}" var="item">

</apex:repeat>

</apex:outputPanel>

 

 

Has anyone come up with a workaround that might work in lieu of a COUNT() function?

 

Thanks,

Ron

 

 

 

 

We have a customer account that is configured to use the system address for email notifications related to Case comments:

 

Set under Setup >> Customize >> Cases >> Support Settings

 

"Send Case Notifications from System Address" = checked.

 

... but the email address and company name that appears on the email notifications needs to be changed.  Where in the blazes is this configured?   I can't find it anywhere.

 

- Ron

I've set up a simple trigger to insert a FeedPost when one of my Customer Portal Users creates an entry through Sites and found that the trigger only works when I create an entry from inside Salesforce (as a regular SF user).

 

When a Customer Portal User creates an entry, the trigger fails with the error: "Invalid type: FeedPost"  

 

The API version on all the code is 18.0.

 

I've also tried putting the "insert FeedPost" call in a class without sharing, but it still fails in the Customer Portal context.

 

What are the limitations on integration Chatter with Sites and Customer Portal Users?   Can we even trigger chatter activity from portal user actions?

 

- R

 

 

(This is just a test case ... I know the trigger isn't set up to handle bulk inserts)

 

 

trigger ItemReview on Item_Review__c (after insert) {

	
	for (Item_Review__c review :trigger.new) {
		Chatter.feedPost(review.Item__c,  'A review has been posted for this item.'
				,null);
		
	}

}

 

 

 

 

 

public without sharing class Chatter {

	public static void feedPost(String parentId, String body, String link) {
		try {
		   FeedPost fpost = new FeedPost();
		   fpost.ParentId = parentId; //eg. Opportunity id, custom object id..
    		    fpost.Body = body;
    		    insert fpost;	
            	 
        } Catch (Exception ex) {
            	
        }
		
	}
}

 

 

Can we dynamically assign package licenses when registering new customer or high volume portal users?

 

We have customers who want to give their portal users access to a managed package (per seat licensing) when they register for portal user accounts.

 

- Ron

In playing with the new Rich Text field, we've found that you cannot use the field to store html with style or class attributes ... these are stripped out automatically.

 

There is also no way to edit the content as html, or add <h> tags, <table>, floats etc.

 

Does anyone know if there are plans to allow developers to enable these?  Possibly through the field definition or as attributes on the <apex:inputField> tag?

 

It's too bad really, as the ability to see the rich text controls while a record is in edit mode is a much better user experience than we've been able to achieve with our own FckEdit component.

 

 

 

 

We've done some testing with the hierarchical custom settings feature and have run into what appears to be limitation when managing individual user settings from Apex (hopefully not).

 

We created a custom setting object and simple checkbox field (let's call it UI_Settings__c.Show_Feature__c) and would like our apex code to be able to store individual user settings for that value.  Something like this:

 

 

public PageReference saveUISettings() { UI_Settings__c userInstance = UI_Settings__c.getValues(UserInfo.getUserId()); userInstance.Show_Feature__c = this.showFeature; update userInstance; // save changes to UI preferences.

return null; }

 

 This works fine if we have manually configured a custom setting instance for each user through the Salesforce UI.  But it looks like we can't store user-level settings if the custom setting instance hasn't been created for a user.  And there appears to be no way to create that custom setting instance from Apex.

 

Is this true?

 

Thanks,

Ron

 

I've discovered that the following code will catch an invalid decimal exception (e.g. value = ' ') ...

 

 

 

global static Decimal toDecimalIfValid(String value) { Decimal result; if (value <> null) { try { result = Decimal.valueOf(value); } catch (Exception ex) { System.debug('Error converting '+value+' to decimal.'); } } return result; }

 

 

 

... but this code won't:

 

 

global static Decimal toDecimalIfValid(String value) { if (value <> null) { try { return Decimal.valueOf(value); } catch (Exception ex) { System.debug('Error converting '+value+' to decimal.'); } } return null; }

 

 

 

 

Both use try-catch to trap the error.  Is this a bug?  A feature?

 

- Ron

 

Seeking an experienced full-time Salesforce Project Manager/Power Administrator.  The project manager will take ownership of SFDC consulting and integration projects, and also perform Salesforce configuration and administrative tasks for multiple clients.

Location: Solana Beach, CA (San Diego) --  This is an on-site position (relocation not available)

Company: Linvio, Inc.

Responsibilities:

Lead the planning and implementation of projects

Facilitate the definition of project scope, goals and deliverables

Define project tasks and resource requirements

Assemble and coordinate project staff

Track project deliverables and communicate project status/progress to clients

Experience:

Direct work experience as a project manager

Proven experience in people management

Proven experience in strategic planning and risk management

Hands-on experience using and administering Salesforce accounts

Experience installing and configuring managed packages from the Salesforce AppExchange.

 
Qualified candidates should send resumes to jobs@linvio.com. Candidates only please.

 
Message Edited by Ron Wild on 12-02-2009 08:30 PM

I have an unmanaged package that passes all apex tests in the dev org, but won't upload to the AppExchange.  I get the following error during the upload (as test methods are being run):

 

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, admin operation already in progress: []

 

The error occurs in a trigger that fires on update of a Batch_Run object, on the line that creates a another  Batch_Run object from inside the trigger.   

 

This unmanaged package is similar to another package that has uploaded successfully in the past and does the same  trigger action, plus the code runs and passes tests in my dev org ... so I'm at a loss for explaining this one.

 

Has anyone seen this error before?

 

Thanks

I'd like to check to see if a batch job is already queued before starting it again, but haven't been able to figure out how to identify my job... the MethodName is always empty so I can't search for the job by it's method name like so:

 

// Check to see if batch update is already queued or in process
AsyncApexJob[] queuedJobs = [ Select a.Status, a.MethodName, a.Id From AsyncApexJob a where status in ('Queued','Processing') and MethodName like '%BatchUpdateCampaignPayments%'];
if (queuedJobs.size() >0) return;

 

And I don't see any way to set the MethodName when starting the job.

 

 

Any ideas?

 

Thanks,

Ron

Message Edited by Ron Wild on 10-03-2009 05:33 PM

I'm getting the following error with IE in the Salesforce javascript supporting Ajax calls ....

 

 

Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Wed, 23 Sep 2009 02:00:43 UTC Message: Unknown runtime error Line: 120 Char: 1 Code: 0 URI: http://homewarrantygroup.force.com/faces/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.AjaxScript

 



 

 

The page is hosted in an iFrame and works perfectly in Firefox, but when I click an actionButton in IE, the Ajax callback starts (but doesn't finish) and IE shows this error in the alerts area.

 

Has anyone else run into this error?  Is there a fix?

 

Thanks,

Ron 

I'm trying to update the number of available seats on an LMA license record (sfLma__License__c) and getting the error

 

Update failed. First exception on row 0 with id a0770000006dZUZAA2; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, sfLma.updateCustomerLicense: execution of BeforeUpdate caused by: System.Exception: Failed to get next element (System Code)

 

I can edit the number of seats from the License detail page, but not from Apex. 

Does anyone know what's going on in the License manager app that might be preventing the update?

 

Thanks,

Ron

 

 

Linvio, Inc. is looking for an experienced Salesforce developer to work out of our office in Solana Beach, CA.   Local applicants only - no relo.   We are close to the train station, so we might go as far north as Orange County if the job candidate is willing to commute 3-4 times a week.

 

Please don't respond here ... send applications to jobs (at) linvio (dot) com  Recruiters need not respond.

 

Here's the job description:

 

Company:

       Linvio, Inc.
 
Job Title:

       Salesforce Developer/Integration Specialist

 

Description:

       Linvio, Inc.  is seeking candidates for the position of Salesforce Developer, who will be responsible for customizing, developing and supporting solutions on Salesforce.com’s Force.com platform.

 Specific areas of concentration include:

    * Working closely with clients and our other consultants to determine project requirements
    * Building client-specific solutions on the Force.com platform using Apex, PHP and Visual Force
    * Developing integration processes using Salesforce.com’s Web Services API and third-party integration tools (Apex Data Loader, Pervasive, etc).
    * Effective, expedient completion of client projects

Required Skills/Experience:

    * B.S. in Computer Science/MIS with a demonstrated record of academic excellence
    * 1-2 years experience in Salesforce.com development including creating custom objects, workflows, S-Controls, Force.com and VisualForce development and the Apex programming language
    * Expert knowledge of object-oriented methodologies and approaches
    * Expert knowledge of relational databases and data modeling
    * Proficiency in HTML/XHTML, XML, Javascript, AJAX, SQL, Java, PHP, SOAP-based web services, Apex, and SOQL
    * Experience with ETL tools.
    * Familiarity with integrated development environments such as Eclipse.
    * Knowledge of enterprise systems, CRM, SFA, and ERP
    * Client-focused attitude
    * Excellent analysis skills and the ability to develop processes and methodologies
    * Self-starter who can multi-task
    * Team player with strong communication and interpersonal skills
    * Detail-oriented individual with the ability to rapidly learn and take advantage of new concepts, business models, and technologies.

Desired Skills/Experience:

    * Force.com developer certification


 
Candidates must be local to the San Diego, CA area and will be prescreened by phone and then given the opportunity for a one-on-one interview.  Candidates passing the interview stage may be expected to demonstrate development skills by building a basic Salesforce application.

Linvio is a small but rapidly growing Salesforce application development and systems integration company in the San Diego area.  Our offices are located in Solana Beach, CA, just walking distance from the Coaster/Amtrak train station, the beach, and a number of really good restaurants and fun places to down a cool one after work.    The work environment is casual and fun, but were serious about quality and making a difference in the world.   Hopefully, you are too.

This is a full-time temp-to-hire position.

 

** Again - local applicants only, no recruiters.  Thanks **

Message Edited by Ron Wild on 08-22-2009 07:22 PM

I'm running the following test code in the Execute Anonymous window of the IDE and am getting inconsistent results.

 

 

Contact contact = new Contact(id='0034000000RGSfrAAH');
contact.mailingstreet = '123 Oak';
update contact;

 

This contact happens to be a person account.

 

Initially, I get a successful execution (multiple times). But if I wait about 20 seconds and run it, I get:

 

System.DmlException: Update failed.  First exception on row 0 with id 0034000000RGSfrAAH: first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id.

 

Anyone have an idea on why I'm only getting the error part of the time?

 

Thanks,

Ron

 

 

 

I have a Sites implementation that displays Product attachments (jpegs, png, etc) along side Product details ...

The page displays everything correctly for the guest user license.  But when a guest user logs in and becomes a customer portal user, the user can no longer view the attachments.  Product details (name, description, etc.) are still visible.

 

I have a custom profile that I assign to each customer portal user (license = "Customer Portal Manager") and see

that there are options to enable read access for:

 

Accounts,

Assets,

Cases,

Contacts,

Documents,

Ideas,

and Solutions

 

...but not Attachments or Products.  

 

 

The guest profile on the other hand, has options for read/create on 

Accounts,

Assets,

Cases,

Contacts,

Contracts,

Documents,

Ideas,

Leads,

Opportunities,

Pricebooks,

Products,

and Solutions

 

Does the customer portal user have read access to fewer standard objects than the guest user?

 

And how can I enable read-access on Product Attachments on the customer portal profile?

 

Thanks,

Ron

 

 

Linvio, Inc. is looking for a mid-to-senior Salesforce developer/solution architect to work out of our office in Solana Beach, CA.   Local applicants only - no relo.   We are close to the train station, so we might go as far north as Orange County if the job candidate is willing to commute 3-4 times a week.

 

Please don't respond here ... send applications to jobs (at) linvio (dot) com  Recruiters need not respond.

 

Here's the job description:

 

Company:

       Linvio, Inc.
 
Job Title:

       Senior Technical Architect

Description:

       Linvio, Inc.  is seeking candidates for the position of Senior Technical Architect, who will be responsible for architecting, developing and supporting solutions on Salesforce.com’s Force.com platform.

 Specific areas of concentration include:

    * Working closely with clients and our other consultants to determine project requirements
    * Building client-specific solutions on the Force.com platform using Apex and Visual Force
    * Developing integration processes using Salesforce.com’s Web Services API and third-party integration tools (Apex Data Loader, Pervasive, etc).
    * Effective, expedient completion of client projects

Required Skills/Experience:

    * B.S. in Computer Science/MIS with a demonstrated record of academic excellence
    * 2 years experience in Salesforce.com development including creating custom objects, workflows, S-Controls, Force.com and VisualForce development and the Apex programming language
    * Expert knowledge of object-oriented methodologies and approaches
    * Expert knowledge of relational databases and data modeling
    * Proficiency in HTML/XHTML, XML, Javascript, AJAX, SQL, Java, PHP, SOAP-based web services, Apex, and SOQL
    * Experience with ETL tools.
    * Familiarity with integrated development environments such as Eclipse.
    * Knowledge of enterprise systems, CRM, SFA, and ERP
    * Client-focused attitude
    * Excellent analysis skills and the ability to develop processes and methodologies
    * Self-starter who can multi-task
    * Team player with strong communication and interpersonal skills
    * Detail-oriented individual with the ability to rapidly learn and take advantage of new concepts, business models, and technologies.

Desired Skills/Experience:

    * Force.com developer certification

    * Experience as a consultant on Salesforce.com implementations
    * 1 year experience in consulting & project management

 
Candidates must be local to the San Diego, CA area and will be prescreened by phone and then given the opportunity for a one-on-one interview.  Candidates passing the interview stage may be expected to demonstrate development skills by building a basic Salesforce application.

Linvio is a small but rapidly growing Salesforce application development and systems integration company in the San Diego area.  Our offices are located in Solana Beach, CA, just walking distance from the Coaster/Amtrak train station, the beach, and a number of really good restaurants and fun places to down a cool one after work.    The work environment is casual and fun, but were serious about quality and making a difference in the world.   Hopefully, you are too.

This is a full-time temp-to-hire position.

 

We're seeing some odd behavior in the Force.com IDE and in the Salesforce UI when viewing apex test coverage results...

 

In the SF UI, comments, system.debug and even portions of parameters lists are being displayed with a red highlight - indicated no test coverage.

 

And in the IDE, we're seeing 100% coverage results for all classes ....even though we know that's not the case.

 

Has anyone else come across this?

 

- Ron

Hi,

 

I want to ask about appexchange service. Is there any payment in appexchange service? If yes, how about the list of the price or is there any information about this? Helps would be appreciated...

Thanks

 

Hello,

 

Has anybody worked on sites pages that uses Linvio PaymentConnect without redirecting to it's SitesCheckout page.

 

Thanks,

Vishnu

Hi,

 

We have a Scheduler Class for a Batch Class, both of which are working fine as evidenced by the fact that they have both successfully fired on schedule the last three days.  The Test Class, however, seems to be written incorrectly / not invoking properly.  The text class is below:

 

@isTest

class TestStampForecastLastUpdated {
	
	static testMethod void testStampForecastLastUpdated() {
		
		// Declare Local Variables
		final string							accountRecordType = 'Distributor';
		Id										accountRecordTypeId;
		Map<String, Schema.RecordTypeInfo>		accountRecordTypes = new Map<String, Schema.RecordTypeInfo>();
		CronTrigger								cronTrigger;
		String 									jobId;
		final Date								monthEnd = date.valueOf('2008-02-29 00:00:00');
		final Date								today = System.today();
		Product2								product;
		
		// Get Account Record Type Ids
		accountRecordTypes = Schema.SObjectType.Account.getRecordTypeInfosByName();
		accountRecordTypeId = accountRecordTypes.get(accountRecordType).getRecordTypeId();

		// Create an Account
		Account a1 = new Account (Name = 'Acme', Product_Discount_Amount__c = 9, RecordTypeId = accountRecordTypeId);
		Insert a1;
		
		// Get a Product
		product = [SELECT Id FROM Product2 WHERE IsActive = true AND Forecast__c = true LIMIT 1];
		
		// Create a Forecast record in the past and one in the future
		Forecast__c f1 = new Forecast__c (Account__c = a1.id, Backlog_Quantity__c = 1, Backlog_Amount__c = 100, Est_Forecast_Rev__c = 100, Last_Updated__c = date.valueOf('2008-02-15 00:00:00'), Month_End_Date__c = monthEnd, Product__c = product.Id, Quantity__c = 1, Shipped__c = 1, Shipped_Amount__c = 100, Shipped_and_Backlog__c = 150);
		Forecast__c f2 = new Forecast__c (Account__c = a1.id, Backlog_Quantity__c = 1, Backlog_Amount__c = 100, Est_Forecast_Rev__c = 100, Last_Updated__c = date.valueOf('2008-02-15 00:00:00'), Month_End_Date__c = today, Product__c = product.Id, Quantity__c = 1, Shipped__c = 1, Shipped_Amount__c = 100, Shipped_and_Backlog__c = 150);
		insert f1;
		insert f2;
		
		// Execute the batchable test
		Test.startTest();

		// Schedule the test job
		String scheduleExpression = '0 0 0 3 9 ? 2022';
		jobId = System.schedule('testScheduleStampForecastLastUpdated', scheduleExpression, new ScheduleStampForecastLastUpdated());
		
		// Get the CronTrigger info
		cronTrigger = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE Id = :jobId];
		
		// Assert that the expressions are the same
		System.assertEquals(scheduleExpression, cronTrigger.CronExpression);
		
		// Assert that the Cron job has not started
		System.assertEquals(cronTrigger.TimesTriggered, 0);
		
		// Assert that the Forecasts have their original values
		System.assertEquals([SELECT Last_Updated__c FROM Forecast__c WHERE Id = :f1.Id].Last_Updated__c, date.valueOf('2008-02-15 00:00:00'));
		System.assertEquals([SELECT Last_Updated__c FROM Forecast__c WHERE Id = :f2.Id].Last_Updated__c, date.valueOf('2008-02-15 00:00:00'));
		
		// Stop the test
		Test.stopTest();
		
		// Assert that the Forecasts have their proper values
		System.assertEquals([SELECT Last_Updated__c FROM Forecast__c WHERE Id = :f1.Id].Last_Updated__c, date.valueOf('2008-02-15 00:00:00'));
System.debug('f2 = ' + [SELECT Status__c FROM Forecast__c WHERE Id = :f2.Id]);
		System.assertEquals([SELECT Last_Updated__c FROM Forecast__c WHERE Id = :f2.Id].Last_Updated__c, System.today());
	}
}

 

The last assertion fails, although the System.debug line shows that it should have been processed.  Again, the Scheduler and Batch are working properly, which leads me to believe that this Test Class is constructed improperly.

 

Relevant code from the Scheduler and Batch below, although again, they have fired properly as scheduled every day since scheduled.

 

global class ScheduleStampForecastLastUpdated implements Schedulable {

	global void execute (SchedulableContext sc) {

		stampForecastLastUpdated sflu = new stampForecastLastUpdated('SELECT Last_Updated__c FROM Forecast__c WHERE Status__c = \'Active\'');
		database.executebatch(sflu);
	}
}

 

global class StampForecastLastUpdated implements Database.Batchable<sObject>{

	global final string	query;
	date				today = date.today();

	global StampForecastLastUpdated(String query) {
		this.query = query;
	}
	
	global Database.QueryLocator start(Database.BatchableContext BC) {
		return Database.getQueryLocator(query);
	}

	global void execute(Database.BatchableContext BC, List<sObject> scope) {
		List<Forecast__c> forecasts = new List<Forecast__c>();

		for (sObject s : scope) {
			Forecast__c f = (Forecast__c)s;
			f.Last_Updated__c = today;
			forecasts.add(f);
		}
		update forecasts;
	}

	global void finish(Database.BatchableContext BC) {
	}
}

 

 

Thanks,

Marc

As an ISV, say you introduce references to Person Account fields in your Apex code in a managed package.

 

Does this imply that any customer wishing to install your package needs to enable Person Accounts??  If so, what are the best practices or workarounds for this?  Obviously we cannot assume that all potential customers will want to enable Person Accounts in their orgs...

 

Thanks.


Dave

 

  • June 17, 2010
  • Like
  • 0

I am trying to insert a FeedPost on a Contact when I add a new related record, and I'm using the code from the Chatter Code Recipes to insert a FeedPost:

 

 

FeedPost fpost = new FeedPost();
fpost.ParentId = oId; //eg. Opportunity id, custom object id..
fpost.Body = post;
insert fpost;

 

 

I replaced oId with the associated Contact.Id, but the error is occurring on the previous line: Save error : Invalid type : FeedPost

 

This is my Chatter dev org, so I know it's enabled - is there something else that I need to add when I'm working from a trigger?

I've set up a simple trigger to insert a FeedPost when one of my Customer Portal Users creates an entry through Sites and found that the trigger only works when I create an entry from inside Salesforce (as a regular SF user).

 

When a Customer Portal User creates an entry, the trigger fails with the error: "Invalid type: FeedPost"  

 

The API version on all the code is 18.0.

 

I've also tried putting the "insert FeedPost" call in a class without sharing, but it still fails in the Customer Portal context.

 

What are the limitations on integration Chatter with Sites and Customer Portal Users?   Can we even trigger chatter activity from portal user actions?

 

- R

 

 

(This is just a test case ... I know the trigger isn't set up to handle bulk inserts)

 

 

trigger ItemReview on Item_Review__c (after insert) {

	
	for (Item_Review__c review :trigger.new) {
		Chatter.feedPost(review.Item__c,  'A review has been posted for this item.'
				,null);
		
	}

}

 

 

 

 

 

public without sharing class Chatter {

	public static void feedPost(String parentId, String body, String link) {
		try {
		   FeedPost fpost = new FeedPost();
		   fpost.ParentId = parentId; //eg. Opportunity id, custom object id..
    		    fpost.Body = body;
    		    insert fpost;	
            	 
        } Catch (Exception ex) {
            	
        }
		
	}
}

 

 

Hi - Thanks for the providing neat and clear solution on the validation. I am trying this and having some road blocks. Can some one please address where the issue is?

 

This is the one i am trying.

I am receiving error: Static Resource named jquery does not exist. Check spelling

and sometimes

unexpected token: '' unexpected token: '<EOF>'at line 0 column -1.

 

 

here is my id value for vendor_meet  j_id0:j_id1:j_id2:j_id63: Validation Error: Value is required.

Please advise.Thanks

 

<apex:page controller="My_Controller" showHeader="false" standardStylesheets="false"> <apex:includeScript value="{!$Resource.jquery}"/> <apex:includeScript value="http://ajax.microsoft.com/ajax/jquery.validate/1.6/jquery.validate.min.js"/> <script type="text/javascript"> $(document).ready(function() { $(jq(f)).validate(); $(jq(vendor_meet)).rules("add",{ required: true }); jQuery.validator.messages.required = "Please enter a value"; jQuery.validator.messages.equalTo = "You have to enter a value. Please!!!"; }); </script> <apex:form id="commentForm" > <script> var vendor_meet = "{!$Component.vendor_meet}"; </script> <apex:outputlabel for="vendor_meet">Vendor (required)</apex:outputlabel> <apex:inputText id="vendor_meet" value="{!Vendor_Meetings}"/> <apex:commandButton action="{!save}" value="Save"/> </apex:form> <script> function jq(myid) { return '#' + myid.replace(/(:|\.)/g,'\\\\$1'); } var f = "{!$Component.commentForm}"; </script> </apex:page>

 

 

 

Message Edited by mavs on 03-17-2010 08:51 AM
Message Edited by mavs on 03-17-2010 08:52 AM
Message Edited by mavs on 03-17-2010 02:39 PM
Message Edited by mavs on 03-17-2010 06:38 PM
  • March 17, 2010
  • Like
  • 0

I have overridden the New Task buttonto go to a visualforce page which acts as a url creator depending on where the new button was called from.  It builds a the standard new task url but adds a whoId, whatId and retUrl parameter.

 

My problem is that, i want the user to be redirected to the New Task they just created upon clicking on 'save', however instead the user is taken to the homepage upon saving.  And this is no matter what I put in the retUrl.  If I take out the override and manually add some retUrl values to the default new Task page everything works fine.

 

What am I doing wrong?

 

 

Let me know if you need to see any pieces of code and I will gladly provide. 

Message Edited by astro on 03-08-2010 03:35 AM
  • March 08, 2010
  • Like
  • 0

Hi all

 

I am writing test cases for my Apex Page and want to verify that different messages are set at different points.

 

For this, I would like to clear out existing messages from my ApexPage.

 

Something similar to:

 

ApexPages.Messages = new List<ApexPages.Message>();


Is there a way to do this?

 

We are going to start using Sites to capture some personal details, so this will facilitate using SSL in the form. We will want to use a custom domain name to mask the force.com site (eg. subscribe.ourdomain.com instead of site.secure.force.com)

 

I know that force.com has its own SSL certificate for *.force.com, however my concern is that if we override with a custom domain name, the browser will see an inconsistency between the URL (ourdomain.com) and the SSL certificate for force.com, and display an ugly 'exception' page (which most browsers now do - IE7/8, FF3).

 

Is there any way to get round this? Will this even be an issue with custom domain names? We are not in live yet so I can't properly test this case, however would be interested to get some feedback from the SFDC sites product team on this... :)

 

Thanks

Stephen

Hi i have created a visualforce email template, now for the preview it renders the image but when i get an email it does not render the image. I get the red cross and i have tried clicking on display all images but no luck :(

 

 

 

<messaging:emailTemplate recipientType="Contact" relatedToType="Applicant__c" subject="Thank you for your Application!"> <messaging:htmlEmailBody > <html> <head> <style type="text/css"> body { font-family: Verdana; font-size:12px; } table { border-width: 1px; border-spacing: 0px; border-style: solid; border-color: #000000; font-family: Verdana; font-size:12px; } td { border-width: 1px; border-spacing: 0px; border-style: solid; border-color: #000000; } </style> </head> <body> <apex:image url="{!URLFOR($Resource.Online_Application_Resource, 'Online_Application/Images/BOC_Logo.jpg')}"/><br/><br/> <p> Dear {!relatedTo.Applicant_Title__c} {!relatedTo.Applicant_Forename_s__c} {!relatedTo.Applicant_Surname__c} </p> <p> Thank you for applying for the {!relatedTo.Online_Application__r.Term__c}. Your Application is now being processed. </p> <p> Your unique application reference is {!relatedTo.Online_Application__r.Application_Reference_Number__c}. Please always quote this reference when you contact us. </p> <!--<apex:outputPanel rendered="{!IF(relatedTo.Online_Application__r.Method_of_Payment__c = 'Cheque', 'true', 'false')}">--> <p> As you have chosen to pay by <b>Cheque</b>, you will need to send us the cheque which is dated and made payable to yourself. Please make sure that you quote your name and the above reference number on the back of your cheque. </p> <!--</apex:outputPanel>--> <!--<apex:outputPanel rendered="{!IF(relatedTo.Online_Application__r.Method_of_Payment__c = 'Electronic Transfer', 'true', 'false')}">--> <p> As you have chosen to pay by <b>Electronic Transfer</b> via your Bank's internet banking service, you <br/>will need to quote the following details<br/> Sort code: *********<br/> Account number: *********<br/> Reference: <b>{!relatedTo.Online_Application__r.Application_Reference_Number__c}</b> </p> <!--</apex:outputPanel>--> <!--<apex:outputPanel rendered="{!IF(relatedTo.Online_Application__r.Method_of_Payment__c = 'Bank of Cyprus UK Account', 'true', 'false')}">--> <p> As you have chosen to pay through your existing <b>Bank of Cyprus UK Account</b>, we will collect <br/>funds from your existing account with us. </p> <!--</apex:outputPanel>--> <!--<apex:outputPanel rendered="{!IF(relatedTo.Online_Application__r.Method_of_Payment__c = 'Direct Debit', 'true', 'false')}">--> <p> As you have chosen to pay by <b>Direct Debit</b>, we will make a one off Direct Debit claim for the <br/>Bond deposit amount from the account number you have specified in your application after five <br/>working days from the date of this confirmation.<br/> Having accepted your Direct Debit details, we would like you to confirm that they are correct.<br/> Please can you check the details below.<br/><br/> <table width="60%"> <tr> <td><b>Bond amount</b></td> <td>{!relatedTo.Online_Application__r.Amount_to_be_Deposited__c}</td> </tr> <tr> <td><b>Branch sort code</b></td> <td>{!relatedTo.Online_Application__r.Direct_Debit_Sort_Code__c}</td> </tr> <tr> <td><b>Bank/Building society <br/>account number</b></td> <td>****{!RIGHT(relatedTo.Online_Application__r.Direct_Debit_Account_Number__c,4)}</td> </tr> <tr> <td><b>Account name</b></td> <td>{!relatedTo.Online_Application__r.Direct_Debit_Account_Name__c}</td> </tr> <tr> <td><b>Reference</b></td> <td>{!relatedTo.Online_Application__r.Application_Reference_Number__c}</td> </tr> </table> </p> <p> If any of the above details are incorrect, please contact Customer Service as soon as possible <br/>on 0845 850 5555* (+44 20 8267 7343 if calling from abroad) </p> <p> If your details are correct, you need to do nothing and your Direct Debit will be processed as normal. You have the right to cancel the Direct Debit at any time before it is processed. <br/>A copy of the Direct Debit Guarantee is set out below.<br/><br/> <apex:image url="{!URLFOR($Resource.BocBranding, 'DirectDebitLogo.gif')}"/><br/><br/> The Direct Debit Guarantee<br/> <ul> <li>This Guarantee is offered by all banks and building societies that accept instructions <br/>Direct Debits</li> <li>If there are any changes to the amount, date or frequency of your Direct Debit Bank of <br/>Cyprus UK will notify you 10 working days in advance of your account being debited or <br/>as otherwise agreed.</li> <li>If you request Bank of Cyprus UK to collect a payment, confirmation of the amount and <br/>date will be given to you at the time of the request.</li> <li>If an error is made in the payment of your Direct Debit, by Bank of Cyprus UK or your bank <br/>or building society, you are entitled to a full and immediate refund of the amount paid <br/>from your bank or building society <ul> <li>If you receive a refund you are not entitled to, you must pay it back when <br/>Bank of Cyprus asks you to.</li> </ul> </li> <li> You can cancel a Direct Debit at any time by simply contacing you bank of Building Society. <br/>Written confirmation may be required.Please also notify us. </li> </ul> </p> <!--</apex:outputPanel> --> <p><b> If you are eligible to receive interest wihtout tax taken off, please return the R85/R105 <br/>forms, quoting {!relatedTo.Online_Application__r.Application_Reference_Number__c} to the address below for processing. </b></p> <p> Customer Service<br/> Bank Of Cyprus UK<br/> PO Box 17484<br/> London<br/> N14 5WH<br/> </p> <p> If you have any queries relating to your application please contact Customer Service on <br/>0845 850 555 (+44 20 8267 7343 if calling from abroad). </p> <p> Your sincerely </p> <p> Bank of Cyprus UK </p> </body> </html> </messaging:htmlEmailBody> <!-- <messaging:plainTextEmailBody > Congratulations! This is your new Visualforce Email Template. </messaging:plainTextEmailBody> --> </messaging:emailTemplate>

 

 

 

Has anyone got this able to work?

I was told by eWay support that we create a form for customers to fill out, that form then populates an object in salesforce, and then we manually process the payment.

 

Where do I even begin to get this started? I have an eWay account and all that setup. I'm just to the point of needing to know how to start accepting payments. 

My VF Sites application is working fairly well now but there is one nagging detail - the title attribute on the apex:page tag does not seem to flow into the browser.

 

<apex:page controller="SitesSearchCustomController" action="{!init}" showHeader="false" sidebar="false" title="Foo">

 results in a browser page that looks like this (note - no title appears)

 Firefox 3.0.8

 

or (Chrome):

 Chrome

 

or IE7:

 

 

What am I doing wrong?

 

Eric 

 

Message Edited by studebaker on 04-17-2009 05:57 PM
we just enabled person account on the contact object, but there are lots of existing contacts do not have any 1 to 1 person account on account object,
 
Is there any way to create person accounts for these existing contact without deleting these contacts, as these contacts were referenced by different objects;
 
here is my code trying to do: the record type in account is updated successful, but is IsPersonAccount is field in Account is still set to false
 
Code:
//get the business account record type
RecordType NotPersonAccountRecordType = [select Id, Name, SobjectType,
         IsPersonType from RecordType where SobjectType='Account'
         and IsPersonType=False];

// get 1 existing account
Contact c = [select id, AccountId, FirstName, LastName, Cris_Id__c from Contact where IsPersonAccount = false Limit 1];


// create a new account and set the record type to business account
Account newAccount = new Account();
newAccount.Name='' + c.LastName;
newAccount.RecordTypeId = NotPersonAccountRecordType.Id;
insert newAccount;


//get the person account record type
recordType personaccountrecordtype = [select Id, Name, SobjectType,
         IsPersonType from RecordType where SobjectType='Account'
         and IsPersonType=True];

// update the existing contact's account to new account
c.AccountId = newAccount.Id;
update c;


// now get it again and update the firstname and lastname, change the record type to person account
newAccount = [select id,lastName, Firstname, RecordTypeId from Account where Id =: newAccount.Id];
newAccount.RecordTypeId = personaccountrecordtype.Id;
newAccount.LastName=c.LastName;
newAccount.FirstName=c.FirstName;   
update newAccount;

These code runs successfully, but the IsPersonAccount in Account object is false for some reason

Any one have idea how to get around the problem or other direction to do these?


thanks in advance


 


Message Edited by Feng on 12-10-2008 05:57 PM

Message Edited by Feng on 12-10-2008 05:59 PM
  • December 11, 2008
  • Like
  • 0
I am getting this error when trying to add a currency type field to a VF page. I expect it has somethign to do with multicurrency being enabled in the org but I don't know how to handle it. Here is my apex code... if I remove the column and outputfields for opportunity.amount, then the page works fine.
 
How do I deal with correcting this? Thanks
 

<apex:pageBlockTable value="{!opportunities}" var="o" rendered="{!selectedSize <> 1}">

<apex:column rendered="{!selectedSize > 1}" headerValue="Action">

<apex:outputLink value="{!URLFOR($Action.Opportunity.View, o.id)}">view</apex:outputLink>

</apex:column>

<apex:column headerValue="Opporunity Name">

<apex:commandLink value="{!o.name}" action="{!setbubble}" status="status" rerender="thePlot,selectedBubbles">

<apex:param value="{!o.id}" name="foo" assignTo="{!selectedId}"/>

</apex:commandLink>

</apex:column>

<apex:column headervalue="Account Name"><apex:outputField value="{!o.accountId}"/></apex:column>

<apex:column headerValue="Amount"><apex:outputField value="{!o.amount}"/></apex:column>

<apex:column headerValue="Stage"><apex:outputField value="{!o.stageName}"/></apex:column>

<apex:column headerValue="Probability"><apex:outputField value="{!o.probability}"/></apex:column>

<apex:column headerValue="Close Date"><apex:outputField value="{!o.closeDate}"/></apex:column>

</apex:pageBlockTable>

<apex:pageBlockSection rendered="{!selectedSize == 1}">

<apex:outputField value="{!opportunity.name}"/>

<apex:outputField value="{!opportunity.account.name}"/>

<apex:outputField value="{!opportunity.probability}"/>

<apex:outputField value="{!opportunity.closeDate}"/>

<apex:outputField value="{!opportunity.amount}"/>

<apex:outputField value="{!opportunity.lastActivityDate}"/>

</apex:pageBlockSection>