• chemin
  • 5 Points
  • Member since 2008

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 8



I'm writing apex code which automates creation of a customer portal user.

First I create a new contact. Then I create a new user linked to that contact, with all required attributes to access the customer portal. It all works well except that I can't get the new password notification sent to the new user.


In other words, I can't find a way to "select" the "Generate new password and notify user immediately" option from apex.


Any hint would be highly appreciated!!!




  • February 14, 2009
  • Like
  • 0

I'm trying to make my apex code navigate automatically to a given account page (after some processing, the method comes up with the account id). My apex code is invoked by an update trigger. Is this possible?

  • October 02, 2008
  • Like
  • 0

Hi, I need to deal with the selected records from enhancedlist view. In my custom controller, I always get "c2=0" by using controller.getSelected() whenever I make the selection in the listview and then click the "get seleted" link.   What is the event for the selection?


And getRecords() can not return more than 20 that is not useful for the project.


And getRecords() can not get refresh when I select another view in the view option dropdown list.

I really appraciate if anybody has a idea! 


My test page:

<apex:page standardController="ProfileHierarchy__c" recordSetvar="profiles" extensions="testController">

<apex:enhancedlist type="ProfileHierarchy__c" height="200" rerender="c1,c2" />

<apex:outputText id="c1" value="c1={!c1}" /> <br>
<apex:outputText id="c2" value="c2={!c2}" /> <br>
<apex:form >
<apex:commandLink action="{!setC2}" value="get selected" reRender="c2" />

my controller:

 public class testController {

public testController (ApexPages.StandardSetController controller)

public ApexPages.StandardSetController li{get;set;}


public Integer getC1(){
return ((List<ProfileHierarchy__c>)li.getRecords()).size();

public Integer c2=0;
public Integer getC2(){
 return c2;
public void setC2(){
 c2 = ((List<ProfileHierarchy__c>)li.getSelected()).size()+1;



I'm trying to make my apex code navigate automatically to a given account page (after some processing, the method comes up with the account id). My apex code is invoked by an update trigger. Is this possible?

  • October 02, 2008
  • Like
  • 0
I'm passed an object id and want to clone it. I'm guessing I need to write a soql query to get an instance of the object then clone it but I don't want to hard code all the field names as they may change. Is there a way to do a select * or a way of getting the object that doesn't involve hard coding?
Hello All
My name is Mustafa Miah and I am representing a recruitment company called Eurobase People. I am currently recruiting for a professional services company, who are a major partner to Salesforce.com.
My client is currently seeking a Salesforce.com Developer, with extensive development experience of the package to work on a 3-month contract between 2 of their client sites in both London & Milton Keynes.
If you are interested in the opportunity please give me a call on: +44 (0)207-648-2499 for a brief chat or alternatively you can send me your updated CV in application for the role to: mustafa.miah@eurobase-international.com
Many Thanks


I believe this is only recent, but I am no longer able to perform API actions against my development install using code that hasn't changed in quite some time.  When I run the code listed below, I get a error on the "Describe Object" call that says "INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session".   It looks as though I'm getting a valid session ID back from the login call, but the subsequent API call doesn't seem to like it.   

The interesting thing is that I have a QA org that's on NA1 (my dev org is also on NA1) that has no problems with the code below.   Also, this problem is only happening for my dev org when I run the code from our corporate environment.  If the code runs on our production environment (which have different IP ranges and are locate outside of our corporate office), then it works properly as well.

Is is possible that there is some sort of configuration set in my dev org that doesn't agree with the code below as it's run from our corporate environment?  I've played around with the "Lock sessions to the IP address from which they originated" setting in my dev org, but it didn't seem to do anything.

Here is the code I am running that seems to work for every other install except my dev org:

          Dim sfdcService As New SforceService

          Dim loginResult As New LoginResult

          sfdcService.SessionHeaderValue = New SessionHeader

          loginResult = sfdcService.login(username, password)

          sfdcService.Url = loginResult.serverUrl

          sfdcService.SessionHeaderValue.sessionId = loginResult.sessionId

          Dim results As SForce.DescribeSObjectResult = sfdcService.describeSObject("Lead")


Any help would be greatly appreciated.

Thank you,


  • February 12, 2008
  • Like
  • 0