+ Start a Discussion
Bob Poliquin 1Bob Poliquin 1 
I have a test class that is giving me an error I've never seen before. When I try to send it over to my production org via outbound change set and then validated it via inbound change set I receive the error below.
 
System.DmlException: Insert failed. First exception on row 0; first error: ENTITY_IS_DELETED, entity is deleted: [] 
Stack Trace: Class.Test_YushProdFileUpload.testAttachments: line 38, column 1


My test class is also below. any help i can get wuold be appreciated. 
 
/**
 * This class contains unit tests for validating the behavior of Apex classes
 * and triggers.
 *
 * Unit tests are class methods that verify whether a particular piece
 * of code is working properly. Unit test methods take no arguments,
 * commit no data to the database, and are flagged with the testMethod
 * keyword in the method definition.
 *
 * All test methods in an organization are executed whenever Apex code is deployed
 * to a production organization to confirm correctness, ensure code
 * coverage, and prevent regressions. All Apex classes are
 * required to have at least 75% code coverage in order to be deployed
 * to a production organization. In addition, all triggers must have some code coverage.
 * 
 * The @isTest class annotation indicates this class only contains test
 * methods. Classes defined with the @isTest annotation do not count against
 * the organization size limit for all Apex scripts.
 *
 * See the Apex Language Reference for more information about Testing and Code Coverage.
 */
@isTest
private class Test_YushProdFileUpload {

    static testMethod void testAttachments()
    
    
    {
      Yushin_Product__c ypd=new Yushin_Product__c(Discharge_Direction__c='Clamp Traverse');
        
        ypd.Opportunity__c='0063900000rYAez';
        ypd.Account__c ='0013900001dOm8T';
        ypd.Discharge_Direction__c='Clamp Traverse';
        ypd.IMM_Mfr__c='Arburg';
        ypd.IMM_Model__c='NT450';
        ypd.Plant_Voltage__c='110';
        ypd.Interface_Voltage__c='110 VDC';
        insert ypd;
        
        ypd.Opportunity__c='0063900000rYAez';
        ypd.Account__c ='0013900001dOm8T';
        ypd.Discharge_Direction__c='Clamp Traverse';
        ypd.IMM_Mfr__c='Engel';
        ypd.IMM_Model__c='110t';
        ypd.Plant_Voltage__c='110';
        ypd.Interface_Voltage__c='110 VDC';
        update ypd;
        
        VRController_YProdFileUpload controller=new VRController_YProdFileUpload(new ApexPages.StandardController(ypd));
 
      controller.fileName='Unit Test Attachment';
      controller.fileBody=Blob.valueOf('Unit Test Attachment Body');
        controller.uploadFile();
      
      List<Attachment> attachments=[select id, name from Attachment where parent.id=:ypd.id];
      System.assertEquals(1, attachments.size());
    }
}

 
Best Answer chosen by Bob Poliquin 1
Raj VakatiRaj Vakati
Try this
 
/**
 * This class contains unit tests for validating the behavior of Apex classes
 * and triggers.
 *
 * Unit tests are class methods that verify whether a particular piece
 * of code is working properly. Unit test methods take no arguments,
 * commit no data to the database, and are flagged with the testMethod
 * keyword in the method definition.
 *
 * All test methods in an organization are executed whenever Apex code is deployed
 * to a production organization to confirm correctness, ensure code
 * coverage, and prevent regressions. All Apex classes are
 * required to have at least 75% code coverage in order to be deployed
 * to a production organization. In addition, all triggers must have some code coverage.
 * 
 * The @isTest class annotation indicates this class only contains test
 * methods. Classes defined with the @isTest annotation do not count against
 * the organization size limit for all Apex scripts.
 *
 * See the Apex Language Reference for more information about Testing and Code Coverage.
 */
@isTest
private class Test_YushProdFileUpload {

    static testMethod void testAttachments()
    
    
    {
		
		 Account a = new Account();
        a.Name = 'Test';
        a.Industry = 'Retail';
        insert a;
        Opportunity o = new Opportunity();
        o.name = 'Test';
        o.AccountId = a.Id;
        o.StageName = 'Closed Won';
        o.CloseDate = date.today();
        o.Type = 'New Customers';
        
        insert o;
		
		
      Yushin_Product__c ypd=new Yushin_Product__c(Discharge_Direction__c='Clamp Traverse');
        
      ypd.Opportunity__c=o.id;
        ypd.Account__c =a.Id; 
        ypd.Discharge_Direction__c='Clamp Traverse';
        ypd.IMM_Mfr__c='Arburg';
        ypd.IMM_Model__c='NT450';
        ypd.Plant_Voltage__c='110';
        ypd.Interface_Voltage__c='110 VDC';
        insert ypd;
     ypd.Opportunity__c=o.id;
        ypd.Account__c =a.Id ; 
        ypd.Discharge_Direction__c='Clamp Traverse';
        ypd.IMM_Mfr__c='Engel';
        ypd.IMM_Model__c='110t';
        ypd.Plant_Voltage__c='110';
        ypd.Interface_Voltage__c='110 VDC';
        update ypd;
        
        VRController_YProdFileUpload controller=new VRController_YProdFileUpload(new ApexPages.StandardController(ypd));
 
      controller.fileName='Unit Test Attachment';
      controller.fileBody=Blob.valueOf('Unit Test Attachment Body');
        controller.uploadFile();
      
      List<Attachment> attachments=[select id, name from Attachment where parent.id=:ypd.id];
      System.assertEquals(1, attachments.size());
    }
}

 
Alexander AtkinsonAlexander Atkinson 
Hello I am creating a lightning component. 
I have a list of accounts obtained by a query in an apex class. I want to send this list to an array in a javascript controller that will let me assign the record values to variables.

Apex:
public with sharing class AccountController 
{
    @AuraEnabled
    public static List<Account> getAccounts() 
    {
        List<Account> Accounts =  [SELECT Id, Name FROM Account];
        return Accounts;
    }
}

JavaScript controller:
    doInit: function(component, event, helper) 
    {
        ///Obtain account record list from Apex SOQL and pass it to an array.
        //var records = [] ???
  
        //This list is what will be passed to lightning component when function ends.
        var newItems=[];
        
        //Loop through records array and create item list using record field values.
        for (var i=0; i< records.length; i++)
        {
            var record = records[i];
            var Item = {title: record.name, id: record.id, status: "Unassigned"};
            newItems.push(Item);
        }  
        //Pass items into component
        component.set("v.allItems", newItems);
    },
Best Answer chosen by Alexander Atkinson
Khan AnasKhan Anas (Salesforce Developers) 
Hi Alexander,

I trust you are doing very well.

Please try below code:
 
doInit : function(component, event, helper) {
        var action = component.get("c.getAccounts");
        action.setCallback(this,function(response){   
         
            var state = response.getState();
            if(state === "SUCCESS"){
                var records = response.getReturnValue();
                console.log('Server-> ' + JSON.stringify(records));
                
                var newItems=[];
                for (var i=0; i< records.length; i++)
                {
                    var record = records[i];
                    console.log('record-> ' + JSON.stringify(record));

                    var Item = {title: record.Name, id: record.Id, status: "Unassigned"};
                    console.log('Item-> ' + JSON.stringify(Item));

                    newItems.push(Item);
                    console.log('newItems-> ' + JSON.stringify(newItems));
                }
                component.set("v.allItems", newItems);
            }
        });
        $A.enqueueAction(action);
 },

Note: Please take care of lowercase and uppercase as JavaScript is case-sensitive.


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas
vijay kumar 598vijay kumar 598 
suppose consider account and contact objects.  in creation of contact their shows account lookup field ,press the lookup icon shows the all accounts list in new window.my question is it is possible to edit that list. Like that list shows who doesn't have contacts or who have less than some vale of recors(take 10),these names only display that list.By using this list only select one account and create a contact. 
please help me this.

thanks in advance
Best Answer chosen by vijay kumar 598
Newbie__SalesforceNewbie__Salesforce
Hi vijay

First you need to create a number field on account object to store count of contacts associated with it. You can do this by writing a trigger can refer the following code
 
trigger CountNumberOfContacts on Contact (after delete, after insert, after undelete, after update) {

	List<Contact> lstContacts;
    if (Trigger.isDelete) {
        lstContacts = Trigger.old;
    } else {
        lstContacts = Trigger.new;
    }

    Set<ID> accountIds = new Set<ID>();
    for (Contact con : lstContacts) {
            accountIds.add(con.AccountId);
    }
    
    List<Account> accountsToUpdate = new List<Account>(SELECT Id, Name, Number_of_Contacts__c, ([SELECT Name FROM Contacts) FROM Account where Id in accountIds]);
    for(Account acct : accountsToUpdate){
        List<Contact> contactList = acct.Contacts;
        if(contactList!=null){
            acct.Number_of_Contacts__c = Integer.valueOf(contactList.size());
        }
    }
    update accountsToUpdate;
}

 
Second create a lookup filter to display only accounts with number of contacts less than 10. Use Number_of_Contacts__c field created on account to compare count. 

Lookup filter queries refer this link - https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/salesforce_filtered_lookups_cheatsheet.pdf
Let me know if u face any issue for the same
Simon234Simon234 
I need to create a Button for the Page Layout that links to the Visualforce Page (another page). It's for custom object. How can I do that? Can I use "Buttons, Links, and Actions" to open VF Page? Or I need to create another VF Page?
Best Answer chosen by Simon234
Raj VakatiRaj Vakati
You can create a on click javascripy button that will redirect to the another vf page 
 
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} 
var accReq = "{!Account.Name}";
if(accReq != '') {
window.location="/apex/VisualforceName?id={!Account.Id}";
}
else {
alert('Name is mandatory');
window.location.reload(); 
}

 
Darren HerboldDarren Herbold 
I'm trying to complete the challenge in "Create Transaction Security Policies" unit in the Transaction Security Module. I'm following the directions explicitly, but for some reason, when I create the "New Custom Transaction Security Policy", and I choose the only user available in the drop-down (which is me with Sys Admin rights) for "Execute policy as" property, I keep getting the error: "Specify a valid execution user". Again, this user is a sysadmin and it won't accept it as a valid execution user. Not sure why a user with sysadmin rights would not be considered a valid execution user. I've tried creating new playground instances, but still I get the same error. I'm dead in the water at this point and can't finish this trail! Please help!

User-added image

User-added image
Best Answer chosen by Darren Herbold
Darren HerboldDarren Herbold
I solved the issue. Apparently, Chrome was blocking pop-ups and I couldn't select the execution user from that screen. Even if I typed in the name of the user in the textbox exactly as it was spelled for that user, if you don't select it from the pop-up, it will NEVER work. Lesson here: always allow popups in Salesforce.
Matthew AllenMatthew Allen 
Hi,

I have the below piece of code which is returning a Syntax error of 'Missing )'

All looks ok to me??

<td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" /></apex:outputLabel></td>

Any ideas?
Best Answer chosen by Matthew Allen
Khan AnasKhan Anas (Salesforce Developers) 
Hi Matthew,

I trust you are doing very well.
 
If you use outputText it will work.
 
<td style="width:20%">
    <apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};">
        <apex:outputText label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" />
    </apex:outputLabel>
</td>


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas
srikanth cheera 11srikanth cheera 11 
I have one picklist
and I have one vf button

if we choose the value in the picklist only that time button should be apper on the screen plz help me

​plz use only apex and visualforce

Thanks
Best Answer chosen by srikanth cheera 11
Khan AnasKhan Anas (Salesforce Developers) 
Hi Srikanth,

I trust you are doing very well.

Below is the sample code which I have tested in my org and it is working fine. Kindly modify the code as per your requirement.

Visualforce:
<apex:page standardController="Account" extensions="TestC">
    <apex:form >
        
        <apex:sectionHeader Title="Address Details" />
        <apex:pageBlock Title="Select the type of Address">
            
            <apex:pageBlockSection columns="1">
                <apex:PageBlockSectionItem >
                    <apex:outputLabel value="Address"/>                    
                    <apex:selectList id="id_1" value="{!Account.Rating}" size="1" >
                        <apex:actionSupport event="onchange" reRender="Container"/>
                        <apex:selectOptions value="{!items}"/>
                    </apex:selectList>                    
                </apex:PageBlockSectionItem>
                
                <apex:PageBlockSectionItem >                    
                    <apex:outputPanel id="Container" >
                        <apex:outputPanel id="ajaxrequest" rendered="{!Account.Rating!=''}" >
                            <apex:commandButton value="Continue"/>
                        </apex:outputPanel>           
                    </apex:outputPanel>
                </apex:PageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Controller:
public with sharing class TestC {
    
    private Account AD;
    
    public TestC(ApexPages.StandardController stdcontroller) {
        this.AD=(Account)stdController.getRecord();
    }
    
    Boolean disp=False;
    
    Public Boolean getdisp(){
        return disp;
    }
    
    String Values;
    
    public String getValues() {
        return Values;
    }
    
    public void setValues(String Values) {
        this.Values= Values;
        if(Values!=null)
            disp=True;
    }
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('None','None'));
        options.add(new SelectOption('CA','Cease Address'));
        options.add(new SelectOption('CANADA','Canada'));
        options.add(new SelectOption('MEXICO','Mexico'));
        return options;
    }
    
}


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas​
Swetha S415Swetha S415 

Hello,
how to write a custom validation rule such that it prevents special character and spaces, it should allow only alphanumeric characters. But it should not affect any old records until unless user edits that field.

Example:
Not be allowed.
1.Student*&&^
2.Stud ent   
 
Allowed:
1. Student5654

Best Answer chosen by Swetha S415
Khan AnasKhan Anas (Salesforce Developers) 
Hi Swetha,

I trust you are doing very well.

Please use below syntax:
 
NOT(REGEX( Name , "^[a-zA-Z0-9_]*$"))

Here, Name is a text field. You can replace it with actual field.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas
Alison LaRocco 9Alison LaRocco 9 
Hi There!

I am trying to calculate the total number os days in a given month based on custom fields created at the Opportunity level:

Custom Fields:
  • Start Date
  • End Date
  • Start Month
  • Last Day EOM
IF( Start_Date__c > Last_Day_EOM__c ,0,
IF( End_Date__c < Start_Month__c ,0,
IF(AND(Start_Date__c < Start_Month__c ,End_Date__c > Last_Day_EOM__c), Last_Day_EOM__c - Start_Month__c +1,
IF(AND(Start_Date__c < Start_Month__c, End_Date__c <= Last_Day_EOM__c), End_Date__c - Start_Month__c +1,
IF(AND(Start_Date__c >=Start_Month__c, End_Date__c <= Last_Day_EOM__c), End_Date__c - Start_Date__c +1,
IF(AND(Start_Date__c >= Start_Month__c,End_Date__c > Last_Day_EOM__c), Start_Month__c - Start_Date__c +1 , 0 ))))))

Any assistance in shorting this formula would be GREAT!

Thanks all!
Best Answer chosen by Alison LaRocco 9
Harish DHarish D
Any of these fields are formula fields? 
Start Date
End Date
Start Month
Last Day EOM

If yes try to convert them into non-formula fields and update them with workflow rules.
Michael Marshall 44Michael Marshall 44 
I am trying to connect to my sandbox environment in eclipse by creating a new Force.com project. I am able to login normally through a browser but for an unknown reason I get a timeout when trying through new project. 

Some details:
  • We are sitting behind a proxy but eclipse is able to download the plugins (Force IDE, debugger and lightning) without issue. Proxy info is already configured in the workspace by default thanks to our org.
  • I tried using Java 7 and 8 but still get the same issue. Obviously this should work for both.

================ LOGS ==============

!ENTRY com.salesforce.ide.core 2 0 2018-09-19 14:33:21.920
!MESSAGE  WARN [2018-09-19 14:33:21,915] (BaseRetryAspect.java:isLoginExceptionRetryable:124) - Login evaluation deemed exception not retry-able:
 ConnectException: Connection timed out: connect


!ENTRY com.salesforce.ide.core 2 0 2018-09-19 14:33:21.964
!MESSAGE  WARN [2018-09-19 14:33:21,921] (BaseRetryAspect.java:isConnectionExceptionRetryable:159) - Connection evaluation deemed exception not retry-able:
 ConnectException: Connection timed out: connect


!ENTRY com.salesforce.ide.core 2 0 2018-09-19 14:33:21.971
!MESSAGE  WARN [2018-09-19 14:33:21,965] (ProjectController.java:getRemotePackageNames:862) - Unable to get project packages for project 'Dev5': Connection timed out: connect


!ENTRY com.salesforce.ide.core 2 0 2018-09-19 14:33:21.985
!MESSAGE  WARN [2018-09-19 14:33:21,983] (ProjectOrganizationPage.java:prepareNextPage:278) - Unable to load org details - package names and component enablement

!STACK 0
java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259)
    at com.sforce.ws.transport.JdkHttpTransport.connectRaw(JdkHttpTransport.java:136)
    at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:100)
    at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:95)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:91)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:95)
    at com.sforce.soap.partner.wsc.PartnerConnection.login(PartnerConnection.java:1065)
    at com.salesforce.ide.core.remote.Connection.login(Connection.java:254)
    at com.salesforce.ide.core.remote.Connection$$FastClassByCGLIB$$8e61a81d.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
    at com.salesforce.ide.core.internal.aspects.LoginRetryAspect.loginRetry(LoginRetryAspect.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.salesforce.ide.core.remote.Connection$$EnhancerByCGLIB$$a39cd227.login(<generated>)
    at com.salesforce.ide.core.factories.ConnectionFactory.getNewConnection(ConnectionFactory.java:82)
    at com.salesforce.ide.core.factories.ConnectionFactory.storeConnection(ConnectionFactory.java:167)
    at com.salesforce.ide.core.factories.ConnectionFactory.getConnection(ConnectionFactory.java:134)
    at com.salesforce.ide.core.project.ProjectController.getRemotePackageNames(ProjectController.java:847)
    at com.salesforce.ide.core.project.ProjectController.loadRemotePackageNames(ProjectController.java:876)
    at com.salesforce.ide.ui.wizards.project.ProjectOrganizationPage$1.run(ProjectOrganizationPage.java:343)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
    at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:483)
    at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:237)
    at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:989)
    at com.salesforce.ide.ui.wizards.project.ProjectOrganizationPage.loadOrgDetails(ProjectOrganizationPage.java:331)
    at com.salesforce.ide.ui.wizards.project.ProjectOrganizationPage.prepareNextPage(ProjectOrganizationPage.java:234)
    at com.salesforce.ide.ui.wizards.project.ProjectOrganizationPage.getNextPage(ProjectOrganizationPage.java:223)
    at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:857)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:413)
    at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
    at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
    at org.eclipse.jface.window.Window.open(Window.java:794)
    at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:133)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
    at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
 
Best Answer chosen by Michael Marshall 44
Raj VakatiRaj Vakati
You need to update your network settiing in eclipse ... Please refer this 
https://stackoverflow.com/questions/36207093/setting-auto-proxy-in-force-com-ide-behind-vpn


Go to “Window –> Preferences”
Preferences box prompt out, choose “Network Connections”
Select “Manual” from Action Provider drop down list
Select Http in the List and click “Edit” button
Fill in the proxy server host and port number, (fill in the username and password if any)
Ok, Done.