• swaran
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 7
    Replies

Hi

 

I have an requirement to compare createddate with system date. I know in Apex coding we can do using system.today() method.

 

In Java, I have query on case object. this query should retrive the records created on that day itself.

 

my query is

 

binding.query("select id,CaseNumber,BRAND_del__c,Account.City_dealer__c,Tenure__c,Account.Dealer_Code_FINNONE__c,Mobile__c,Age__c,Gross_Loan_Amount__c,Advanced_EMI_Amount__c,CreatedDate from Case where Count_of_Fraud_Records__c=0 and CreatedDate=system.today() limit 1");

 

Can you please help me in writing this filter condition?

 

Thanks in advance.

 

Regards,

Swaran

 

 

 

  • November 26, 2009
  • Like
  • 0

Am Migrating code from one instance to a different instance.

 

Am migration a trigger code on a custom object. When I try to deploy the trigger code to another sandbox, am getting error as

 

"Field is not writeable: <<custom object name>>__Share.RowCause"

 

Any help is highly appreciated.

Hi,

 

I am having two tabs in my Visualforce page. Each tab is referring to a component.

 

I have visual force page using standard controller with multiple extensions.Am using custom save functionality for saving the records.

 

Am unable to get the syntax for how to call save methods of multiple extensions on single click.

 

I tried in the following way.

<apex:page standardController="Order_Line_Item__c" action="{!init}" extensions="picklistvalues,Backup1"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Custom Save" action="{!cmdsave}"/> </apex:pageBlockButtons> <apex:tabPanel > <apex:tab label="Access & Port"> <c:AccessPort ControllingPicklist="{!ControllingPicklist}" ControllingPicklistOptions="{!AccTypeOptions}" CustInt="{!CustInt}" CustIntOptions="{!CustIntOptions}"/> </apex:tab> <apex:tab label="Backup"> <c:Backuptest Backup="{!bkp}"/> </apex:tab> </apex:tabPanel> </apex:pageBlock> </apex:form> </apex:page>

cmdsave function exists in the picklistvalues controller. I am trying to call the save function of Backup1 from this method.

But it is saving only the records which belong to the cmdsave method. When we check in debug logs the records in the save method

of backup1 controller is null.

 

Backup1 BackupClass=new Backup1(); public void cmdsave(){ system.debug('ssssssssssss'+AccportRecords.size()); for(Integer i=0;i<AccportRecords.size();i++){ if(AccportRecords[i].Order_Line_Item__c==null) AccportRecords[i].Order_Line_Item__c=OrderLineId; if(i==0){ AccportRecords[i].Access_Type__c=ControllingPicklist; system.debug('ssssssssssss'+AccportRecords[i].Access_Type__c); AccportRecords[i].Customer_Interface__c=CustInt; } } Upsert AccportRecords; system.debug('ssssssssssss'+AccportRecords); BackupClass.BackupSave(); }

 

 

public void save(){ for(integer i=0;i<objAccportlist.size();i++) { if(objAccportlist[i].Order_Line_Item__c==null) objAccportlist[i].Order_Line_Item__c='a0gR0000000YmIzIAK'; } upsert objAccportlist; system.debug('backupinserted'+objAccportlist); //picklistclass.cmdSave(); }

Any help is appreciated.

 

Thanks

Swaran

Hi,

I am importing data through DataLoader.I am getting the following error when I load the data.

 

Subscription Start Date: invalid date: Wed May 15 00:00:00 GMT 9

 

Subscription Start Date is Date type field.

 

How to over come this?

 

Thanks.

  • March 02, 2009
  • Like
  • 0

In testmethod I inserted a account with Name field.Its showing the following message

 

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>

 

But I am able to create Account record through tab.

  • February 26, 2009
  • Like
  • 0
I want to check the uniquness of the contact object based on multiple fields.

I am loading the data from csv file to Contact object.Here i don't have Id to update the existing contact record.So I am using the combination of fields.(like last name,email,phone).I have written a trigger to update the record instead of insert.Trigger code is below.
trigger uniquetrigger on Contact (before insert){
Contact objuniqueCon;
for(Contact objCon:Trigger.new){
objuniqueCon=[select id,email,phone from Contact where email=:objCon.email and phone=:objCon.phone];
if(objuniqueCon.Id!=null) {
system.debug(objuniqueCon.Id);
objuniqueCon.email=objCon.email;
objuniqueCon.phone=objCon.phone;
update objuniqueCon;
}

}
}

but every time the record is been inserted instead of update.

  • January 15, 2009
  • Like
  • 0
I have created an web Service Method in Java and generated an WSDL file from it.
When trying to generate an Apex class from this WSDL file i am getting this Error.
Please Help me out to sole this Problem.
WSDL file is attached here.
Code:
<—xml version="1.0" encoding="UTF-8"–>
<wsdl:definitions targetNamespace="urn:fibonacci" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:fibonacci" xmlns:intf="urn:fibonacci" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <wsdl:types>
  <schema targetNamespace="urn:fibonacci" xmlns="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_xsd_int">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="calculateFibonacciRangeResponse">

      <wsdl:part name="calculateFibonacciRangeReturn" type="impl:ArrayOf_xsd_int"/>

   </wsdl:message>

   <wsdl:message name="calculateFibonacciRequest">

      <wsdl:part name="in0" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="calculateFibonacciRangeRequest">

      <wsdl:part name="in0" type="xsd:int"/>

      <wsdl:part name="in1" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="calculateFibonacciResponse">

      <wsdl:part name="calculateFibonacciReturn" type="xsd:int"/>

   </wsdl:message>

   <wsdl:portType name="Fibonacci">

      <wsdl:operation name="calculateFibonacci" parameterOrder="in0">

         <wsdl:input message="impl:calculateFibonacciRequest" name="calculateFibonacciRequest"/>

         <wsdl:output message="impl:calculateFibonacciResponse" name="calculateFibonacciResponse"/>

      </wsdl:operation>

      <wsdl:operation name="calculateFibonacciRange" parameterOrder="in0 in1">

         <wsdl:input message="impl:calculateFibonacciRangeRequest" name="calculateFibonacciRangeRequest"/>

         <wsdl:output message="impl:calculateFibonacciRangeResponse" name="calculateFibonacciRangeResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="fibonacciSoapBinding" type="impl:Fibonacci">

      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="calculateFibonacci">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="calculateFibonacciRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="calculateFibonacciResponse">

             <wsdlsoap:header encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:output>

      
  <wsdl:output name="calculateFibonacciResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="calculateFibonacciRange">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="calculateFibonacciRangeRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="calculateFibonacciRangeResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="FibonacciService">

      <wsdl:port binding="impl:fibonacciSoapBinding" name="fibonacci">

         <wsdlsoap:address location="http://localhost:8080/axis/services/fibonacci"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

 
Can any one Please refer some pdf's on usage of external webservice method in salesforce(by java).
 
  • September 16, 2008
  • Like
  • 0
Error: Failed to parse wsdl: WSC only supports SOAP Header use='literal' but found encoded
o parse wsdl: WSC only supports SOAP Header use='literal' but found encoded
Code:
<—xml version="1.0" encoding="UTF-8"–>
<wsdl:definitions targetNamespace="urn:fibonacci" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:fibonacci" xmlns:intf="urn:fibonacci" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <wsdl:types>
  <schema targetNamespace="urn:fibonacci" xmlns="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_xsd_int">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="calculateFibonacciRangeResponse">

      <wsdl:part name="calculateFibonacciRangeReturn" type="impl:ArrayOf_xsd_int"/>

   </wsdl:message>

   <wsdl:message name="calculateFibonacciRequest">

      <wsdl:part name="in0" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="calculateFibonacciRangeRequest">

      <wsdl:part name="in0" type="xsd:int"/>

      <wsdl:part name="in1" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="calculateFibonacciResponse">

      <wsdl:part name="calculateFibonacciReturn" type="xsd:int"/>

   </wsdl:message>

   <wsdl:portType name="Fibonacci">

      <wsdl:operation name="calculateFibonacci" parameterOrder="in0">

         <wsdl:input message="impl:calculateFibonacciRequest" name="calculateFibonacciRequest"/>

         <wsdl:output message="impl:calculateFibonacciResponse" name="calculateFibonacciResponse"/>

      </wsdl:operation>

      <wsdl:operation name="calculateFibonacciRange" parameterOrder="in0 in1">

         <wsdl:input message="impl:calculateFibonacciRangeRequest" name="calculateFibonacciRangeRequest"/>

         <wsdl:output message="impl:calculateFibonacciRangeResponse" name="calculateFibonacciRangeResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="fibonacciSoapBinding" type="impl:Fibonacci">

      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="calculateFibonacci">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="calculateFibonacciRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="calculateFibonacciResponse">

             <wsdlsoap:header encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:output>

      
  <wsdl:output name="calculateFibonacciResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="calculateFibonacciRange">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="calculateFibonacciRangeRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="calculateFibonacciRangeResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:fibonacci" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="FibonacciService">

      <wsdl:port binding="impl:fibonacciSoapBinding" name="fibonacci">

         <wsdlsoap:address location="http://localhost:8080/axis/services/fibonacci"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

 
 

 
  • September 16, 2008
  • Like
  • 0

Am Migrating code from one instance to a different instance.

 

Am migration a trigger code on a custom object. When I try to deploy the trigger code to another sandbox, am getting error as

 

"Field is not writeable: <<custom object name>>__Share.RowCause"

 

Any help is highly appreciated.

Hi,

I am importing data through DataLoader.I am getting the following error when I load the data.

 

Subscription Start Date: invalid date: Wed May 15 00:00:00 GMT 9

 

Subscription Start Date is Date type field.

 

How to over come this?

 

Thanks.

  • March 02, 2009
  • Like
  • 0

In testmethod I inserted a account with Name field.Its showing the following message

 

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>

 

But I am able to create Account record through tab.

  • February 26, 2009
  • Like
  • 0
I want to check the uniquness of the contact object based on multiple fields.

I am loading the data from csv file to Contact object.Here i don't have Id to update the existing contact record.So I am using the combination of fields.(like last name,email,phone).I have written a trigger to update the record instead of insert.Trigger code is below.
trigger uniquetrigger on Contact (before insert){
Contact objuniqueCon;
for(Contact objCon:Trigger.new){
objuniqueCon=[select id,email,phone from Contact where email=:objCon.email and phone=:objCon.phone];
if(objuniqueCon.Id!=null) {
system.debug(objuniqueCon.Id);
objuniqueCon.email=objCon.email;
objuniqueCon.phone=objCon.phone;
update objuniqueCon;
}

}
}

but every time the record is been inserted instead of update.

  • January 15, 2009
  • Like
  • 0