• Sankalp Vyas
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I have seen post for this error but no solution, so I am posting again in hopes of getting an answer. I am trying to send a record to a Salesforce to Salesforce connection if it meets certain parameters. However, received the error posted in the subject line. Below is the code that I am trying to execute:

trigger SimpleCaseTrigger on Case (after update) {
    // Define connection id 
    Id networkId = ConnectionHelper.getConnectionId('Connection Name'); 
    List <Case> sendToConn = New List<Case>();
    List<PartnerNetworkRecordConnection> prncList = new List<PartnerNetworkRecordConnection>();
    for (Case c : Trigger.New){
        //Test to that the case has been successfully closed and has not been sent to Connection Before
        if (c.ConnectionReceivedId == null && c.ConnectionSentID == null && c.Status == 'Successfully Closed'){
            sendToConn.add(c);
            System.debug('Case #'+ c.CaseNumber + ' added.');
        }
    }
    
    //Create Connection to send to Connection
    for (Case newCases : sendToConn){
        PartnerNetworkRecordConnection newConnection =
                    new PartnerNetworkRecordConnection(
                        ConnectionId = networkId,
                        LocalRecordId = newCases.Id,
                        SendClosedTasks = false,
                        SendOpenTasks = false,
                        SendEmails = false,
                        ParentRecordId = newCases.AccountId);
        prncList.add(newConnection);
    }
    database.insert(prncList);
    
}
 
I am new to Salesforce and Java developement. I created a jsp page and used the sf api's. Its running on my locathost but not on the prod server. I am getting the following error:
 
org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
The import com.sforce.soap.enterprise.SoapBindingStub cannot be resolved

Urgent help is appreciated.