• gargamel
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Here is part of the subroutine:

        my $self       = shift;
        my $changelist = shift;
        my $sObject_type = 'ADM_Work__c';

        if( $self->{_p4status} eq $GUS::OPEN_ONCE ) {

            print "\n\n ----------------------------------------------------------------------\n";
            print "$sObject_type, id => " . $self->{_id} . ", Perforce_Status__c => $GUS::NONE)";
            print "\n\n ----------------------------------------------------------------------\n";

            my $result = $self->{_sfdc}->update(type => $sObject_type, id => $self->{_id}, Perforce_Status__c => $GUS::NONE);
           
            if ($result->valueof("//updateResponse/result/success") ne 'true') {
                # log problem here
                print "unable to update p4 status";
            } else {
                $self->{_p4status} = $GUS::NONE;
            }
       
Here is the output:
 ----------------------------------------------------------------------
ADM_Work__c, id => a0HT0000000KIZbMAO, Perforce_Status__c => --None--)

 ----------------------------------------------------------------------

Type looks to be getting set from the print statement output??
Hello all,
 
We currently have a requirement of displaying the contract term dates in a table with links to delete them. It looks something like this.
 
Contract Term Dates                         Action
02/02/2009                                           Remove
09/03/2009                                           Remove
 
where Remove is a link which would delete the contract term date record and refresh the page. I used the apex:commandLink for implementing the Remove link functionality. It does delete the record. However, it throws a Javascript error which says Invalid Argument. The error comes from the javascript snippet generated by the Salesforce engine on the page.
 
I further tried changing the commandLink to commandButton. I use the apex:param to pass the contract term date ID to the controller. However, for some reason the ID does not reach the controller and the controller method throws a List does not return any rows for assignment error.
 
Here is what I wrote:
 
 
Code:
<apex:dataTable id="dataTableObj" value="{!allTermDates}" var="a"  title="Details of Effective Date" rendered="{!showADJTable}">
    <apex:column>
        <apex:commandButton value="Remove" action="{!removeTermDates}" onclick="return confirmDeletion();">
            <apex:param name="termDates" value="{!a.Id}"></apex:param>
        </apex:commandButton>
    </apex:column>
    <apex:column>
        <apex:outputField value="{!a.Date__c}"/>
    </apex:column>
</apex:dataTable>

 

Code:
<script language="Javascript">
 
 function confirmDeletion(){
   return confirm('The Terms Date will be permanently deleted. Do you wish to continue—');
 }
 
</script>


 My Controller method looks something like this:

Code:
public PageReference removeTermDates(){
 Id termId= System.currentPageReference().getParameters().get('termDates');
 System.assertNotEquals(null, termId);
 Term_Dates__c termDat = [select Id, Date_Type__c from Term_Dates__c where id=:termId];

 if(termDat.Date_Type__c.equals('Payment')){

  termPayDateCancelMap.remove(termDat.Id);

 }else if(termDat.Date_Type__c.equals('Adjustment')){
  
  termDateCancelMap.remove(termDat.id);

 }else if(termDat.Date_Type__c.equals('Cash Out')){

  termDateCashCancelMap.remove(termDat.Id);

 }
 delete termDat;
 return null;
}

 
Kindly advise on what I'm missing here.
 
Thanks in advance.
Krishnan
 
error while logging into salesforce.com through API's
 
hi
i am getting following error while i login into salesforce.com through API's.
----------------------------------------Error--------------------------------------

An unexpected error has occurred: ; nested exception is:

java.net.SocketException: Software caused connection abort: recv failed

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.net.SocketException: Software caused connection abort: recv failed

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Software caused connection abort: recv failed

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.skip(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)

at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

at org.apache.axis.client.Call.invoke(Call.java:2767)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)

at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:2221)

at sfdcjava.TestAccount.login(TestAccount.java:174)

at sfdcjava.TestAccount.run(TestAccount.java:375)

at sfdcjava.TestAccount.main(TestAccount.java:73)

{http://xml.apache.org/axis/}hostname:hydhtc29423

java.net.SocketException: Software caused connection abort: recv failed

at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

at org.apache.axis.client.Call.invoke(Call.java:2767)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)

at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:2221)

at sfdcjava.TestAccount.login(TestAccount.java:174)

at sfdcjava.TestAccount.run(TestAccount.java:375)

at sfdcjava.TestAccount.main(TestAccount.java:73)

Caused by: java.net.SocketException: Software caused connection abort: recv failed

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.skip(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)

at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

... 13 more

----------------------------------------Error--------------------------------------

Please suggest  any pointers on this.

Thanks

Asif

  • August 28, 2007
  • Like
  • 0