Geeks With Blogs
Sathya Narayanan Srinivasan .NET Developer

There is an annoying bug in salesforce winter 11 release

MyProfilePageController.cls

System.QueryException: List has no rows for assignment to SObject

Class.MyProfilePageController.testSave: line 78, column 35 External entry point

 

This is also the method for deleting Apex Classes and Triggers from Salesforce Production

 

(Note : You cannot delete an apex class or Trigger from Salesforce Production through changesets. Only way is to use Force.com IDE)

 

1. Install and Open Force.com IDE (don't install if you have already done)

2. Create a new Force.com Project connecting to Sandbox (providing the credentials for sandbox including the security token)

3. Delete the MyProfilePage page and the MyProfilePage meta xml under Pages and also delete the MyProfilePageController class and the MyProfilePageController meta xml under classes. (Right click delete). It will ask you whether you need to delete from the sandbox server too. Say No. Click Ok.

4. Right click on Src or the root folder of your project -> Force.com -> Deploy to server

5. Provide production server credentials

6. from the list shown Deselect all

7. Sort by type

8. Navigate to Pages and Check the checkboxes next to MyProfilePage page and the MyProfilePage meta xml (these will be shown in red as you have deleted  it locally )

9. Navigate to classes and Check the checkboxes next to MyProfilePageController class and the MyProfilePageController meta xml (these will be shown in red as you have deleted  it locally )

10. Click Validate and check whether it gives success. (It will.. if u dont have any problems in any other class )

11. Then Click Next. It will delete the salesforce class and page which has the bug and you can proceed with your further deployments. ( In case if it dint succeed, try deleting the above mentioned 4 files (in point no. 3) from the folder where you have mapped the sandbox project and run through all the steps from the point no. 4).

 Here are the supporting links :-

http://sites.force.com/ideaexchange/apex/ideaview?id=08730000000K1QLAA0

http://boards.developerforce.com/t5/Force-com-Sites/Bug-in-SFDC-provided-test-method-for-MyProfilePageController-cls/td-p/209169

 Salesforce is still working on it to fix it from their end during the next release.

 

Posted on Thursday, December 2, 2010 4:15 AM | Back to top


Comments on this post: An Annoying bug in salesforce winter 11 release and how to delete apex classes and triggers in production

# re: An Annoying bug in salesforce winter 11 release and how to delete apex classes and triggers in production
Requesting Gravatar...
Great site with a major amount of valuable information! Great job!
Left by golfing information on Jun 26, 2011 10:26 AM

Your comment:
 (will show your gravatar)


Copyright © sathya | Powered by: GeeksWithBlogs.net