• StephenB
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 30
    Replies

Hi all, kind of odd - I have a pageBlockTable with some columns. If I use the standard column definition:

 

<apex:column value="{!p.End_Date__c}"/>

 

Then all is well and my header has the End Date label, etc etc. All good.

 

Now I want to use an explicit field definition in the column - ie

 

<apex:column headerValue="Start Date">
                        <apex:outputField value="{!p.Start_Date__c}">
                            <apex:inlineEditSupport disabled="true" />
                        </apex:outputField>
                    </apex:column>

 

The issue is, I have to hard code the label for the col in the headerValue. I should be able to use a variable for this, surely? I've tried using {!p.Start_Date__c} in the headerValue also but doesn't work, I need a 'label for' type definition for the field, so I can get the label for that field without hard coding. Thought something like $componentLabel but can't get this to work either.

 

Seems so simple, but I'm stumped! Anyone got an idea??

 

Thanks, S

 

Hi all, I upgraded just now to latest force.com version (24) in Eclipse. In this upgrade, which I've never seen before, is something called force.com eclipse supporting software, which I presume is a collection of pre-req's that are required for the plug-in (which is nice).

 

When I installed though, eclipse gave me a warning during install, that the supporting software wasn't signed, and seemed to be provided by someone other than salesforce.com. In contrast the v24 plug-in is signed by salesforce.com. Which got me thinking, what exactly is this supporting package and what comes with it?

 

Does anyone have any more info on this?

 

Thanks,

Stephen

Hi techs, have got a puzzling problem. I'm looking at how the PermissionSet data is exposed via the metadata API. The permission set itself is available, and I can get all of the 'top level' permissions that are editable in a permission set - eg. the admin and app preferences. What I don't seem to be able to get to is the child information - eg if I add/change an object's preferences, or field-level security prefs within the permission set, I don't see this info.

 

I'm trying to work out if I can use the metadata API to retrieve and deploy a permission set to another org. It looks like I can do this for the set itself but not for the object/field info within the perm set. In this case, the solution is only going to be half-baked.

 

Anyone have any ideas?

 

Thanks,

Stephen

@sbro_nz

Hi all, got a relatively simple but weird issue - there is an option to turn on Spell Checker in the UI options, which I've done, and as a result have a nice Check Spelling button when I create a new Case as a standard salesforce user. So far so good. However we are getting our portal users to create cases, and the main reason to enable Spell Checker was to have it enabled for the portal users also. However when I create a new case as a portal user, there's no Spell Check button.

 

We're using standard case create pages, no tricks or anything in the portal. There isn't the option to put a 'Spell Check' button on the page layout, so it's obviously outside of config control. But I would expect that it would be enabled in the portal view, the same as the standard internal page view.

 

Anyone (from SFDC) got any ideas??

 

Thanks

Stephen

Hi all, I've been using Workbench (http://wiki.developerforce.com/index.php/Workbench) and I'm annoyed I haven't used it before now - it's an awesome tool!! Quite possibly the most awesome part of it in v3.0.19 is the access to the Bulk API, which is also an amazing new feature in v19 of the API - if you haven't used it yet then you definitely should - allowing parallel processing of data is such a time-saver!

 

There are a couple of things you'll need to do in order to get the Bulk API working via Workbench, which I've been doing over the course of my Friday afternoon, and to save someone else the time, I'm documenting them here:

 

1. If you're using something like XAMPP to run Workbench locally, then you'll need to enable cURL support. This is pretty straight forward - XAMPP has very kindly packaged cURL libraries with the distribution, but you need to enable it, so

- find your php.ini (in %XAMPP%\php directory, where %XAMPP% is where you've installed XAMPP (the base dir)

- open it in your favourite text editor

- search for 'extension=php_curl' and you should get a line that's commented out

- uncomment the line and save

- restart Apache

 

Hey presto! cURL should now be working (check the phpinfo() page to confirm) and Bulk API will work.

 

If you're not using a proxy server you can stop now. If you are, read on...

 

2. The cURL call in the Bulk API php file doesn't support a proxy server, so if you're using one you'll have to add the lines manually.

- Find the file 'BulkAPIClient.php' - this will be in %XAMPP%\htdocs\workbench\restclient

- Open in a text editor

- go to line 173 if you're using v3.0.19 of Workbench. There you'll see the start of a lot of curl_setopt calls - these set the options for when cURL is called.

- You need to add 2 more lines at the end of this curl_setopt section - one for proxy host and one for proxy port.

 

eg. before I changed my code it looked like this:

if($isPost) curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $httpHeaders);
        if($isPost) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);         
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);                                //TODO: use ca-bundle instead
        if($this->compressionEnabled) curl_setopt($ch, CURLOPT_ENCODING, "gzip");  //TODO: add  outbound compression support

 

After I changed it looked like this:

if($isPost) curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $httpHeaders);
        if($isPost) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);         
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);                                //TODO: use ca-bundle instead
        if($this->compressionEnabled) curl_setopt($ch, CURLOPT_ENCODING, "gzip");  //TODO: add  outbound compression support
        curl_setopt($ch, CURLOPT_PROXYPORT, "80");
        curl_setopt($ch, CURLOPT_PROXY, "proxy.internal");

 

If you need authentication for your proxy then add another line using the option CURLOPT_PROXYUSERPWD and the user/pass in the format "username:password"

 

Then save the php file and you should be good to go!

 

Enjoy,

Stephen

Just signed up for my shiny new Summer 10 pre-release org, with the express intention of testing/investigating the URL rewrite feature (which is great to see in the upcoming release!). But Sites isn't active in pre-release??!! As a result, I can't test out URL rewrite at all. 

 

Am I missing something? Or is this intentionally unavailable at this time/at all during pre-release? Anyone from SFDC know any more?

 

Thanks

Stephen

I know this goes against the grain of the whole chatter paradigm, but bear with me...

 

We have 1 SFDC org but 3 very different sets of users using the org. In fact, most of the users probably don't know the other sets of users exist (if you follow me). 

Two of these user groups (and the processes they use SFDC for) lend themselves well to the use of chatter, but the 3rd group doesn't. I have looked over the chatter functionality but as far as I can see, there's no way to limit the use of chatter to just certain user groups/roles/profiles. Is there any way of doing this? I am looking for a flag similar to the "Content user" flag, where I can check on/off the fact that a user (or group of users) has access to chatter.

 

Any thoughts?

 

Hi all,
 
I am getting weird errors when I try and do a repaint of an area of my Visualforce page, in response to an actionFunction. The whole page initially displays ok, so I know that all the necessary apex properties are visible and accessible.
 
When I execute my actionFunction (via onchange of a picklist) I do a couple of things
- update the value of the field back to SFDC immediately
- redraw a section of the page
 
The code is:

<apex:actionFunction action="{!resetStatus}" name="redraw" rerender="commandbuttons" >

    </apex:actionFunction> 
 
When I do this via my sys admin user it works fine. When I do via my customer portal user, I get an Insufficient Privileges error.
 
What's weird is that the update definitely works, as if I go back and check SFDC the updated value is there. This means the page refresh isn't working properly.

Things I have tried:
- debug, but this shows up no notion of the error, only that the action function posts and runs my code (without error)
- customer portal profile - all apex classes and vf pages have been granted, as well as field level security

I am not quite sure what else I can look at. The redraw of the section of page doesn't put anything additional on the page that is not already accessed when the page first loads (successfully), so I'm a little confused what might be causing this.

Anyone seen this before?

Thanks,
Stephen

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

After getting all my tests running fine on Friday, I came in this morning to re-run after some changes to Apex classes. The sandbox was upgraded to Spring 09 on the weekend, and now every time I try to run any tests via Eclipse I get the nice "unknown exception" - unexpected error has occurred message.

 

I can run tests ok via the browser but this is not ideal for debugging.

 

Anyone else getting this after the Spring 09 upgrade? I am still coding using v14 of the API.

 

Thanks,

Stephen

Hi all, I am running into some problems trying to use Apex to manipulate the sharing rules. SFDC lets you do this for custom objects, but their doc says that std objects aren't supported. However - if I look at the schema I can see that OpportunitySharing is available, and creatable, so theory goes I should be able to write to it.

 

I am trying to make some additions to sharing for a particular opportunity by inserting into this object - I can set all the fields I need to, but doing a database.insert gives me 'insufficient access on cross-reference object'. Now I'm not sure if this is a red herring for not being able to insert at all, or if I am missing something else. I am the owner of the record I'm trying to change - would this exclude me from being able to add an explicit sharing record for myself?

 

If anyone has tried Apex sharing on std objects or has some advice I'd be most grateful.

 

Thanks,

Stephen

London, UK

Hi there, posted this in the sforce community boards but then thought it might be a more 'techie' question that someone might have seen before... grateful for any feedback.

Hi there, not sure if anyone has run into this one. I have been doing some work on my developer instance (na3) to create a formula.

if( Forecast_Period__c = "90", case( Probability , 1, 1, 0.9, 1, 0.8, 0.9, 0.7, 0.8, 0.6, 0.7, 0.5, 0.6, 0.4, 0.5, 0.3, 0.4, 0.2, 0.3, 0.1, 0.3, 0, 0, 0), if( Forecast_Period__c = "60", case( Probability , 1, 1, 0.9, 0.9, 0.8, 0.8, 0.7, 0.7, 0.6, 0.6, 0.5, 0.5, 0.4, 0.4, 0.3, 0.3, 0.2, 0.2, 0.1, 0.1, 0, 0, 0), if( Forecast_Period__c = "30", case( Probability , 1, 1, 0.9, 0.9, 0.8, 0.7, 0.7, 0.5, 0.6, 0.3, 0.5, 0.1, 0.4, 0.1, 0.3, 0.1, 0.2, 0, 0.1, 0, 0, 0, 0), 1)) )

This compiles to 1,597 chars, which works fine as it's under the 4k limit. However I then cut and paste to my client's SF instance (emea) and the exact same formula, exact same field names, compile to 18,197 characters! I have re-compiled the formula in the developer instance and it's still fine, so not sure what would be causing this one. It's really driving my nuts as everything else - field names, numbers, the browser, it's all the same!

Anyone else come across this seemingly bizarre issue?

Thanks,
Stephen
Hi there, not sure if anyone has run into this one. I have been doing some work on my developer instance (na3) to create a formula.

if( Forecast_Period__c = "90", case( Probability , 1, 1, 0.9, 1, 0.8, 0.9, 0.7, 0.8, 0.6, 0.7, 0.5, 0.6, 0.4, 0.5, 0.3, 0.4, 0.2, 0.3, 0.1, 0.3, 0, 0, 0), if( Forecast_Period__c = "60", case( Probability , 1, 1, 0.9, 0.9, 0.8, 0.8, 0.7, 0.7, 0.6, 0.6, 0.5, 0.5, 0.4, 0.4, 0.3, 0.3, 0.2, 0.2, 0.1, 0.1, 0, 0, 0), if( Forecast_Period__c = "30", case( Probability , 1, 1, 0.9, 0.9, 0.8, 0.7, 0.7, 0.5, 0.6, 0.3, 0.5, 0.1, 0.4, 0.1, 0.3, 0.1, 0.2, 0, 0.1, 0, 0, 0, 0), 1)) )

This compiles to 1,597 chars, which works fine as it's under the 4k limit. However I then cut and paste to my client's SF instance (emea) and the exact same formula, exact same field names, compile to 18,197 characters! I have re-compiled the formula in the developer instance and it's still fine, so not sure what would be causing this one. It's really driving my nuts as everything else - field names, numbers, the browser, it's all the same!

Anyone else come across this seemingly bizarre issue?

Thanks,
Stephen
Hi there, am at my wit's end on this one. Have a fairly basic S-control which takes info from an opportunity and creates a new custom object called a Sales Order. Once it's done that it redirects the user to the new Sales Order. Have developed and tested this in Firefox 1.5.0.6 and it works fine. However testing on IE 6 SP1 keeps throwing up an "Object required" error (that ol' chestnut...). I know you'll say just use FF, but unfortunately the client doesn't want to change all their browsers just because of this...
 
Was finding it virtually impossible to figure out what IE was doing until I got hold of the MS script debugger. Once I turned that on, I was able to see where the script was breaking. However I found that it was in the sforceclient.js, Line 2541... this is the snippet of code from sforceclient.js (full path https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?browser=true)
 
Sforce.PicklistEntry.prototype = new Sforce.SoapObject;
Sforce.PicklistEntry.prototype.active = new Boolean();
Sforce.PicklistEntry.prototype.defaultValue = new Boolean();
Sforce.PicklistEntry.prototype.label = new String();
Sforce.PicklistEntry.prototype.validFor = new Array();
Sforce.PicklistEntry.prototype.value = new String();
/** @ignore */
Sforce.getResponseNode = function(response) {
 if (sforceClient.appType != Sforce.Application.Type.InternetExplorer) {
  var bNode = response.getElementsByTagName("Body")[0];
  for (i=0;i<bNode.childNodes.length;i++) {
   if (bNode.childNodes[i].nodeType == 1) {
    return bNode.childNodes[i];
   }
  }
 } else {
  return response.getElementsByTagName("soapenv:Body")[0].childNodes[0];             <---- BREAKING HERE
 }
}
 
I have absolutely no idea why this would be happening. Only thing I can think of, is that I have some HTML text in the S-control, which displays the "Processing" dots. I'm wondering if perhaps my HTML text is not laid out correctly. I can see that this code only executes for IE, but not sure whyit would cause processing to stop.
 
As an aside (not sure if it's related or not) I also get a "this page contains both secure and non-secure...." warning message when running on IE but I don't on Firefox.
 
Anyone seen this before? Or have any clues as to what might be going on? Or is there another version of the sforceclient (not beta 3.3) that I could also try?
 
Thanks very much for your help.
 
Stephen Brown
Sofia Works Ltd
75 Cannon St,
London EC4N 5BN, U.K.

An external system with hardcoded api endpoint references is going to be refactored "one of these days", but in the meantime it needs to be updated for Summer 13. The guy looking after this system mentioned that while the production endpoint is currently instance-api.salesforce.com, the test system is using csN.salesforce.com (NOT csN-api.salesforce.com) without problems.

 

To me this raises some questions:

 

Do sandboxes never have -api endpoints? Or are both csN.salesforce.com and csN-api.salesforce.com currently in play?

 

Is If csN.salesforce.com is available, does ths mean instance.salesforce.com is also already available and usable prior to Summer 13? In which case, can the update take place now instead of waiting til the release date?

Hi Everyone,

when I try to install Eclipse Juno 4.2 with the force.com IDE I get the following error message:

 

Cannot complete the install because one or more required items could not be found.
  Software being installed: Force.com IDE 25.0.0.201206181021 (com.salesforce.ide.feature.feature.group 25.0.0.201206181021)
  Missing requirement: Force.com IDE 25.0.0.201206181021 (com.salesforce.ide.feature.feature.group 25.0.0.201206181021) requires 'org.eclipse.update.ui 0.0.0' but it could not be found

 Does anyone know how to fix this?

 

Kind regards,

 

Otto

  • July 02, 2012
  • Like
  • 0

Hi all, kind of odd - I have a pageBlockTable with some columns. If I use the standard column definition:

 

<apex:column value="{!p.End_Date__c}"/>

 

Then all is well and my header has the End Date label, etc etc. All good.

 

Now I want to use an explicit field definition in the column - ie

 

<apex:column headerValue="Start Date">
                        <apex:outputField value="{!p.Start_Date__c}">
                            <apex:inlineEditSupport disabled="true" />
                        </apex:outputField>
                    </apex:column>

 

The issue is, I have to hard code the label for the col in the headerValue. I should be able to use a variable for this, surely? I've tried using {!p.Start_Date__c} in the headerValue also but doesn't work, I need a 'label for' type definition for the field, so I can get the label for that field without hard coding. Thought something like $componentLabel but can't get this to work either.

 

Seems so simple, but I'm stumped! Anyone got an idea??

 

Thanks, S

 

Has anyone else noticed some unexpected behavior with the latest version of the Data Loader, version 21.0?  Here is a list of just some of the issues that I've come across that do not occur when using previous versions of the Data Loader:

 

  1. When attempting to update a small subset of fields contained in the .csv file but not all (ie. mapping only a few fields), the Data Loader throws an the Error:  Failed to find mapping for '<one of the unmapped fields in the .csv file>'.  However, if all the fields in the .csv file are mapped, it appears to work correctly.  Previous versions had no problem with mapping only a subset of fields contained in the .csv file, my guess is this is a bug.
  2. After successfully completing an Export, the Data Loader stops responding to any action button click for Insert, Update, Upsert or Delete.  However, it will let you choose Export or Export All.  I cannot tell if this one is a new "feature" or a bug.
Anyone else experiencing any similar issues?  
Thanks in advance!

 

Hi , I am writing a standard controller for the contact record and below is code and test method....

 

public class ContactController {
public  Contact contact {get; set;}
public string applicationId;
public Student_Information__c studentinfo{get;set;}
    public ContactController(ApexPages.StandardController controller)
    {
        contact = new contact();
        contact.LastName = userInfo.getLastName();
        contact.FirstName = userInfo.getFirstName();
 //       String ContactId = userInfo.getContactId();

// How do I test this part from here....
        User userInfo1 = [Select ContactId, Id from User where Id =: userInfo.getUserId()];
        contact = [Select Id,firstName,lastName,Anticipated_Term_Start_Date__c,Email,Program_of_Interest__c,HomePhone,MobilePhone,Birthdate,
        Contact_Status__c,Gender__c,OtherPhone,LeadSource,MailingStreet,MailingCity,MailingCountry,MailingPostalCode,MailingState,
        OtherStreet,OtherCity,OtherCountry, OtherPostalCode,OtherState,What_are_you_applying_to__c from Contact where Id =: userInfo1.ContactId];
        
        Enrollment_Opportunity__c App = [Select id from Enrollment_Opportunity__c where Applicant__c =: Contact.Id limit 1];
        this.applicationId = App.id;
    }
     
    

  /*  public ContactController()
    {
    Id id = ApexPages.currentPage().getParameters().get('id');
    contact = (id == null) ? new Contact() :
    [SELECT id,name,phone FROM Contact WHERE id = :id];
    }*/
    
    public string getapplicationId ()
    {
        return this.applicationId;
    }    
    
    public PageReference Back()
    {
    
         upsert(contact);
 
         PageReference P = new PageReference('/apex/personalinfo?Id='+Contact.Id);
         p.setRedirect(true);
      return p;
      
   }
   
    
    public PageReference SaveNext()
    {
    
     //try
    // {
         upsert(contact);
  //       contact.LastName = userInfo.getLastName();
  //      contact.FirstName = userInfo.getFirstName();
  //       User userInfo1 = [Select ContactId, Id from User where Id =: userInfo.getUserId()];
  //      contact = [Select Id,firstName,lastName,Anticipated_Term_Start_Date__c,Email,Program_of_Interest__c,HomePhone,MobilePhone,Birthdate,
  //      Contact_Status__c,Gender__c,OtherPhone,LeadSource,MailingStreet,MailingCity,MailingCountry,MailingPostalCode,MailingState,
   //     OtherStreet,OtherCity,OtherCountry, OtherPostalCode,OtherState,What_are_you_applying_to__c from Contact where Id =: userInfo1.ContactId];
         PageReference P = new PageReference('/apex/campacademy?Id='+Contact.Id);
         p.setRedirect(true);
    // }
    // catch(System.DMLException e)
    // {
    //     ApexPages.addMessages(e);
    //  
      //}    
      
      return p;
      
   }
   public PageReference Next()
    {
    
     //try
    // {
         update(contact);
    //     User userInfo1 = [Select ContactId, Id from User where Id =: userInfo.getUserId()];
   //     contact = [Select Id,firstName,lastName,Anticipated_Term_Start_Date__c,Email,Program_of_Interest__c,HomePhone,MobilePhone,Birthdate,
   //     Contact_Status__c,Gender__c,OtherPhone,LeadSource,MailingStreet,MailingCity,MailingCountry,MailingPostalCode,MailingState,
  //     OtherStreet,OtherCity,OtherCountry, OtherPostalCode,OtherState,What_are_you_applying_to__c from Contact where Id =: userInfo1.ContactId];
         if(contact.What_are_you_applying_to__c=='Interlochen Summer Arts Camp'){
         PageReference p = new PageReference('/apex/NewCampApp?Id='+contact.id);
         p.setRedirect(true);
         return p;
         }
         else{        
         PageReference p = new PageReference('/apex/NewApplication?Id='+contact.id);
         p.setRedirect(true);
         return p;
      }
    }  

 /*  
    public PageReference Exit()
    {
    
     //try
    // {
         upsert(contact);
     
         PageReference P = new PageReference('/apex/NewCampApp?Id='+Contact.Id);
         p.setRedirect(true);
    // }
    // catch(System.DMLException e)
    // {
    //     ApexPages.addMessages(e);
    //  
      //}    
      
      return p;
      
   }
  */
     public PageReference SaveExit()
    {
    
     //try
    // {
         upsert(contact);
         PageReference P = new PageReference('/apex/customerportal');
    // }
    // catch(System.DMLException e)
    // {
    //     ApexPages.addMessages(e);
    //  
      //}    
      
      return p;
      
   }
   public PageReference submit()
    {
    
     //try
    // {
         update(contact);
         studentinfo=[Select Id from Student_Information__c where Contact__c =: Contact.Id];
         PageReference r = new PageReference('https://c.cs0.visual.force.com/apex/personalinfo1?Id='+Studentinfo.Id);
    // }
    // catch(System.DMLException e)
    // {
    //     ApexPages.addMessages(e);
    //  
      //}    
      
      return r;
      
   }
   public PageReference Camp()
    {
    
     
         update(contact);
         PageReference r = new PageReference('https://c.cs0.visual.force.com/apex/NewCampApp?Id='+contact.id);
         r.setRedirect(true);
      return r;
      
   }
   public PageReference Academy()
    {
    
         update(contact);
         PageReference r = new PageReference('https://c.cs0.visual.force.com/apex/NewApplication?Id='+contact.Id);
         r.setRedirect(true);
      
      return r;
      
   }

 

 

 

and the test method for this...is

 

@isTest
private class TestContactController {

    static testMethod void testmyController() {
        // TO DO: implement unit test
    /*    
        Map<String,ID> profiles = new Map<String,ID>();
          List<Profile> ps = [select id, name from Profile where name =
             'Standard User1' or name = 'System Administrator'];
    
          for(Profile p : ps){
             profiles.put(p.name, p.id);
          }
        */
        
        Profile p = [select id,name from profile where name='Standard User1'];
             User u = new User(alias = 'standt', email='standarduser1@testorg.com',
                emailencodingkey='UTF-8', lastname='Test1', languagelocalekey='en_US',
                localesidkey='en_US', profileid = p.Id,
                timezonesidkey='America/Los_Angeles', username='standarduser1@testorg.com');
        insert u ;
        
        contact C =New Contact (firstName=userinfo.getFirstName(),lastName=userinfo.getlastname(),id=userinfo.getUserId());
        insert C;
        
        
        Enrollment_Opportunity__c en = New Enrollment_Opportunity__c(Applicant__c =C.Id);
        insert en;
        ApexPages.currentPage().getParameters().put('id',en.Id);
        
        Enrollment_Opportunity__c en1=New Enrollment_Opportunity__c(Applicant__c=C.Id,RecordTypeId='012T00000004cfY');
        insert en1;
        ApexPages.currentPage().getParameters().put('id',en1.Id);
       
        Enrollment_Opportunity__c en2=New Enrollment_Opportunity__c(Applicant__c=C.Id,RecordTypeId='012T00000004cfd');
        insert en2;
        ApexPages.currentPage().getParameters().put('id',en2.Id);
        
       //  ApexPages.StandardSetController ssc = new ApexPages.StandardSetController(accountList);
       // ApexPages.StandardController co=new ApexPages.StandardController(C);
        
        ContactController co = new ContactController(new ApexPages.StandardController(C));
               
        co.getapplicationId();
        co.back();
        co.SaveNext();
        co.Next();
        co.SaveExit();
        co.Submit();
        co.Camp();
        co.Academy();
        
    }
}

 

I am not able to test the user record.......I am receiving an error as LIST HAS NO ROWS FOR ASSIGNMENT TO SOBJECT...at the profile query....

 

what to do...where am I going wrong...

 

Hi All,

 

I have created my first web-service which is supposed to check whether username/password are valid for customer portal user. No redirections are needed, just return something according the result. Here's my code:

 

 

webservice  static Auth validateLogin(String username, String password){
       
       Auth a = new Auth();
 
        String startUrl = 'https://emea.salesforce.com/secur/login_portal.jsp';
         
               startUrl += '?orgId=XXXXX&portalId=YYYYY&loginType=3';
               startUrl += '&startUrl=';
               startUrl += '&loginUrl=';
               startUrl += '&useSecure=true';
               startUrl += '&un=' + username;
               startUrl += '&pw='+ password;

     PageReference p = Site.login(username, password, startUrl);
      
      if (p == null){
          
          a.result = username+password+startUrl;
      }
      else{
          
          a.result = password+username;
      }
       return a;
       
   }

 

 

 

I can login to my portal from the link in the startURL if I input it in my browser and use the 'normal' way, but somehow my pageReference p is always NULL. The object gets returned to my php code and I have double checked all my strings like 1000 times. Why does it let me in using the normal login form, but not with a webservice? Is it the path of startUrl?

 

Do you guys have any direction for me?

Hi all,

   I am working on salesforce sites right now. All the pages and controllers part has been completed except the login and

logout functionalities. Actually i have never worked on this kind of issue and i don't know how to do this. Can any one help

me to complete this task.

 

Thanks,

 

neelam...

 

 

Can anyone tell me how to restrict these 2 formulas so that the profile called "API Only" will ignore these formulas.  I want to restrict my users from modifying things, however, my Scribe integration needs access to modify the opportunities if they are modified on the back end system.  These are the 2 formulas used in my validation rules.

If someone can just paste the complete formulas with the above request in place, that would be much appreciated.

 

First One:

 

AND(OR(ISPICKVAL(StageName, "Closed Won"),ISPICKVAL(StageName, "Closed Lost")),Number_Of_Line_Items__c <PRIORVALUE(Number_Of_Line_Items__c) )

 

Second One:

 

OR(ISPICKVAL(Opportunity.StageName, "Closed Won"), ISPICKVAL(Opportunity.StageName, "Closed Lost"))

Hi,

I have generated the enterprise WSDL in salesforce and now I want to connect to the salesforce from soap UI using the WSDL.

I want to see the response for certain webservices.

I have soap UI standalone app and also the one configured in eclipse ganymade and these can connect to internet using proxy.

 

please help me with steps to configure soapUI in eclipse or in the standalone app with any settings specific to proxy.

 

Thank you

 

 

 

Sidz

  • July 16, 2010
  • Like
  • 0

Hi all,

I am getting an error on force.com site

 

Select Status__c, OwnerId, Id,User__c, User__r.Username__c, Group__r.Name__c, Group__c From GroupMember__c where Group__c = : groupid and Status__c = 'Pending'

i am  running above querry n i am getting error mentioned below:

System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: GroupMember__c.User__r.

 

I have tried many combinations with the querry.

if any one have its solution please help me out from the situation.

 

thanks in advance,

Amit

Hey,

I am using asp.net and allowing user to create task using aspx file. now the data entered by the user has to be stored in salesforce. all things are working fine except when I make user to delete task and set the field IsDeleted=true it is NOT WORKING at all.

 

as even after setting IsDeleted field to true it is still showing false.

 

Why is not getting updated?

 

SforceService Obj_SforceService = new SforceService();


Task task = new Task();

task.Id = "00T90000003FXT4EAO";

task.IsDeleted = true;


SaveResult[] sr = Obj_SforceService.update(new sObject[] { task });


for (int j = 0; j < sr.Length; j++)
{
    if (sr[j].success)
        txtMessage.Text += " Succeed";
    else
    {
        txtMessage.Text +="Failed";
    }

}

 

Above programs works fine with any issue and it is showing the message "Succeed" in textbox. but still it is not updating record and IsDeleted is still false. why?

 

 

 

 

 

According to the SF API manual (version 19), the IP ranges SF uses for outbound messaging are as follows:

 

"Lock down the client application’s listener to accept requests only from the Salesforce.com IP range. While this guarantees the message came from Salesforce.com, it does not guarantee that another customer is not pointing to your endpoint and sending messages. The Salesforce.com IP ranges are:


  • 204.14.232.64 to 204.14.232.79
  • 204.14.234.64 to 204.14.234.79"

We tried this range but messages just bounced off our firewall.  When we temporarily expanded the range, we found an incoming message on 204.14.234.8 - outside the range specified above.  We are working with a sandbox, not production.  It would appear that the IP ranges in the manual are either incorrect or do they do not also apply to a sandbox.  If so, can you provide the correct IP range so we can button up our firewall appropriately?

 

Thanks.

 

- Cris

My deploy from Ant failed this morning to a new "Developer Edition" org with this error; I have a few custom fields added to the User object. This deployment has been working fine and is run very frequently because we use continuous integration.

 

Does anyone have insight into this error?

 

Thanks,

Keith

Hi all,
 
I am getting weird errors when I try and do a repaint of an area of my Visualforce page, in response to an actionFunction. The whole page initially displays ok, so I know that all the necessary apex properties are visible and accessible.
 
When I execute my actionFunction (via onchange of a picklist) I do a couple of things
- update the value of the field back to SFDC immediately
- redraw a section of the page
 
The code is:

<apex:actionFunction action="{!resetStatus}" name="redraw" rerender="commandbuttons" >

    </apex:actionFunction> 
 
When I do this via my sys admin user it works fine. When I do via my customer portal user, I get an Insufficient Privileges error.
 
What's weird is that the update definitely works, as if I go back and check SFDC the updated value is there. This means the page refresh isn't working properly.

Things I have tried:
- debug, but this shows up no notion of the error, only that the action function posts and runs my code (without error)
- customer portal profile - all apex classes and vf pages have been granted, as well as field level security

I am not quite sure what else I can look at. The redraw of the section of page doesn't put anything additional on the page that is not already accessed when the page first loads (successfully), so I'm a little confused what might be causing this.

Anyone seen this before?

Thanks,
Stephen
Hello,
i have problems when i will Logon to SF wir my Excel Connector.
I enter my Username und my Password and use the URL:
https://www.salesforce.com/services/Soap/c/6.0

But the following error occurs:
Error Generated by request::Unable to send request to server. A connection with the server could not be established

ExceptionCode : 5103

The sforce Connector Version is 6.16 and the Office Toolkit Version is 3.0

Thank you in advice.