• Ad_Infosys
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 54
    Replies
HI,
 
The query is -
Is the Outbound message delivery is retried after a fail or exception is recieved by SFDC.
Is the Retrial period for Outbound message configurable.
The retries for delivery of OM is done for a period of 24 hrs. Can we extends this beyond 24 hrs.
I am not able to use 'NULLS LAST' while sorting the data by a picklist field.
 
I am using SOQL of the form
 

Opportunity[] op=[select <picklist field> from opportunity where name!=null order by <picklist field>  NULLS LAST];

 

but the SOQL doesnot produce a result where nulls be placed at last.

 

 

 

Please suggest a resoultion to the issue.

I am facing a show stopper problem.
I ahve developed an apex code in Apex classes. These classes have methods which are called between each other. Each class has several number of SOQLs but in a particular context only few are executed(This is well in limit of 100 SOQLs)
 
Now when I create the code coverage, I have to have cummulative coverage. In test coverage while covering scenerios I get across Too many SOQL 101. I am struck at 60% code coverage.
 
Kindly suggest me a way out. This hidrance wont allow codes to move to Production.
 
I am using following code to sort records in the task object on the basis of activity date. Now I take the result in a set task set. this is pretty sorted. Now I use this set to take out the opporunities related to the tasks. I take result in another list. When I see the result list, the records are not sorted as per the sorting done earlier.. The sorting vanishes.
How to solve this issue.
 
set<id>taskset=new set<id>();
list<id>oppset=new list<id>();
 
 for(task ta_id:[select whatid from task where  DTC_SalesPartner_AdEntId_Txt__c='122' and status!='Completed' order by activitydate asc nulls  last]){
system.debug(ta_id.whatid);             
taskset.add(ta_id.whatid);}
 for(opportunity opp:[select id from opportunity where id in: taskset ]){
system.debug(opp.id);
 oppset.add(opp.id);
system.debug('add');
}
I am using datetime.valueof(date) in a SOQL to convert a date type input to date time and compare it with created date.
 
 Obj__c optec=[select Name from Obj__c where  createddate>=:datetime.valueof(frmdt_Modt) and createddate<=:datetime.valueof(todt_Modt)  order by name desc nulls last];
I give frmdt_Modt a value of 2008,06,26.
I am getting the following error:
 
System.TypeException: Invalid date/time: Mon Jun 09 00:00:00 GMT 2008   
I am creating w web service which ll be accessed by external Java app.
 
Global class Testline {

/* Nested class to structure the result set to sent by the Web Service */
global class TestData{
    webservice list<Obj_Tview__c> plv= new list<Obj_Tview__c>();
    webservice integer count;
    webservice string role;
    }
public class myexception extends exception{}
/* Nested class to store data from different SObject Lists */
WebService static TestData Tmethod(date Frmdt, date todt) {

if(FrmDt==null || todt==null) {
throw new myexception('This is bad');
getpipelinedate sp= new getpipeline data();
...
...
return sp;
}
}
 
 
This web service if tested by unit test, it throws the exception.
I wonder how will it behave when the external java app calls the web service. Actually I was seeing the WSDl generated there is no place holder for eception. How java app will catch the exception.
I have a query that has to extract data from objects in relationship.
 
I am geeting error in the.
 
select (select opportunitycontactrole.contact.best_contact_time__c from opportunity.opportunitycontactroles),opportunity.of_pending_stips__c,opportunity.closing_state__c,opportunity.stagename,opportunity.age__c,opportunity.closedate,opportunity.offer__c from task where owneradentid__c='0'
 
 
Can anyone help me correct.
I want to create a map
 

Map<ID, Contact> m = new Map<ID, Contact>([select id, lastname from contact])

 

The key value ID will be the record id for contact.

I want Account ID in the key set for every record of contact returned. How can I pick that.

 

 
I have a query in for loop the brings records in a list.
 
for(task ta_id:[select whatid from task where owneradentid__c='0' ])
listtest.add(ta_id.whatid);
 
now this list contains 54 records. (2 unique records that are repeated)
 
opportunitycontactrole[] opconr=[select opportunitycontactrole.opportunity.of_pending_stips__c from opportunitycontactrole where opportunityid in : listtest];
 
NOw I want a result set of 54 records but opconr has only 2 records comparing to the 2 unique records in the list
 
How do I do this.
Thanks in advance
Not able to use
Schema.DescribeFieldResult f = Schema.sObjectType.Account.fields.Name;
in an apex code.
 
 
I want to store the field name in a variable and use it in SOQL to make it dynamic
I have requirement to return an SObject and two variables in a web service. How do I cater to this problem.
What is the number of SOQL I can write in a web service.
Are the governor limits changed in platform edition.
If so where to find the details.
The query
 
opportunity opp=[select name, (select count() from opportunity), stagename from opportunity];
 
is giving error
 
Error: Compile Error: Didn't understand relationship 'opportunity' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 12 column 21
 
 
Thanks in advance
I have a webcervice as:
 

global class Pipeline {


  WebService static opportunity[] Apptaker(date adid){

.....

....}

static testMethod void apptakertest() {

sobject[] result= pipeline.Apptaker(2008-06-04);

...

}

 

I am getting error in the apptakertest() at date format. It is not identifying the date.

 

Thanks in advance

 

I have written a web service in SFDC.
 
I downloaded the WSDL for the code.
 
First of all can I access this web service using this WSDL in a java application.
Or do i need to first use login api for login into SFDC and then I can access the web service.
 
Now if login is required do I need to pass Enterprise WSDL also same can be done with the WSDL of web service only.
 
 
Thanks in advance.

If I have a large XML from other external application.

I have the XML on the server i.e. my local machine. the location is something like

C:\\Documents and Settings\\rahul_arora\\Desktop\\book.xml

Now I want this to be utilised in SFDC. All the examples to read the XML have the XML code converted to string and then instantiate the XMLStreamReader.

How do I do in my case. Kindly suggest the elaborated approach.

HI, I implemented the method to pass parameters from SControl to SFDC.

Still I am facing error. My web service is:

global class DTCTest1 {
global class StatusDetail{
webservice String Zip;
webservice String Occupancy;
webservice String Property;
webservice String Grade;
webservice String MaxLoan; }
WebService static String DTC(StatusDetail sd) {
 ZIP_Status_Mapping__c Zsp=[select Status__C from ZIP_Status_Mapping__c where Name =: sd.Zip];
String Cltv=[select Max_CLTV__c from Status_Details__c where ((Occupancy_Type__c =: sd.Occupancy) and (Property_Type__c =: sd.Property) and (Credit_Grade__c =: sd.Grade) and (Max_Loan_Line__c =: sd.MaxLoan)and (Market__C =: Zsp.Status__C))].Max_CLTV__c;
return Cltv;
}

My scontrol has following section.
 
var nr = new sforce.Xml("StatusDetail");
nr.zip = '{!TestScreen__c.Zip__c}';
nr.oc= '{!TestScreen__c.Occupancy__c}';
nr.pro= '{!TestScreen__c.Property__c}';
nr.gra= '{!TestScreen__c.Grade__c}';
nr.max= '{!TestScreen__c.Maxloan__c}';
var result = sforce.apex.execute('DTCTest1' ,'DTC',{sd:nr });
 
I am facin error in retrieving the result. Seems I am not able to send the parameters. Kindly help on this.
 
Thanks in Advance
I am integrating an application with Salesforce.com. I have 100 licenses in SFDC. Whereas 1200 users in the application.
 
How can I make those 1200 users use these limited licenses in such a way that the data from users be unique in SFDC.
 
Any business model that can support the requirement will be helpful.
 
 
Thanks in advance.
HI ALL
We came across an error and thought to seek help from you.
Well we are sending an outbound message to external Tomcat server. There we want to invoke another servlet class. We have supplied the URl for the server in Service endpoint. But following error comes to the monitor of OM.I am also getting this error message in the 'Outbound Messaging Delivery Status'
 
org.xml.sax.SAXParseException: Content is not allowed in prolog
Kindly help us on this. If you could detail down the steps to invoke any class on external server. This class has to pick the Id field sent in OM
HI,
 
The query is -
Is the Outbound message delivery is retried after a fail or exception is recieved by SFDC.
Is the Retrial period for Outbound message configurable.
The retries for delivery of OM is done for a period of 24 hrs. Can we extends this beyond 24 hrs.
I am facing a show stopper problem.
I ahve developed an apex code in Apex classes. These classes have methods which are called between each other. Each class has several number of SOQLs but in a particular context only few are executed(This is well in limit of 100 SOQLs)
 
Now when I create the code coverage, I have to have cummulative coverage. In test coverage while covering scenerios I get across Too many SOQL 101. I am struck at 60% code coverage.
 
Kindly suggest me a way out. This hidrance wont allow codes to move to Production.
 
I am using following code to sort records in the task object on the basis of activity date. Now I take the result in a set task set. this is pretty sorted. Now I use this set to take out the opporunities related to the tasks. I take result in another list. When I see the result list, the records are not sorted as per the sorting done earlier.. The sorting vanishes.
How to solve this issue.
 
set<id>taskset=new set<id>();
list<id>oppset=new list<id>();
 
 for(task ta_id:[select whatid from task where  DTC_SalesPartner_AdEntId_Txt__c='122' and status!='Completed' order by activitydate asc nulls  last]){
system.debug(ta_id.whatid);             
taskset.add(ta_id.whatid);}
 for(opportunity opp:[select id from opportunity where id in: taskset ]){
system.debug(opp.id);
 oppset.add(opp.id);
system.debug('add');
}
I am using datetime.valueof(date) in a SOQL to convert a date type input to date time and compare it with created date.
 
 Obj__c optec=[select Name from Obj__c where  createddate>=:datetime.valueof(frmdt_Modt) and createddate<=:datetime.valueof(todt_Modt)  order by name desc nulls last];
I give frmdt_Modt a value of 2008,06,26.
I am getting the following error:
 
System.TypeException: Invalid date/time: Mon Jun 09 00:00:00 GMT 2008   
I have a query that has to extract data from objects in relationship.
 
I am geeting error in the.
 
select (select opportunitycontactrole.contact.best_contact_time__c from opportunity.opportunitycontactroles),opportunity.of_pending_stips__c,opportunity.closing_state__c,opportunity.stagename,opportunity.age__c,opportunity.closedate,opportunity.offer__c from task where owneradentid__c='0'
 
 
Can anyone help me correct.
I have a query in for loop the brings records in a list.
 
for(task ta_id:[select whatid from task where owneradentid__c='0' ])
listtest.add(ta_id.whatid);
 
now this list contains 54 records. (2 unique records that are repeated)
 
opportunitycontactrole[] opconr=[select opportunitycontactrole.opportunity.of_pending_stips__c from opportunitycontactrole where opportunityid in : listtest];
 
NOw I want a result set of 54 records but opconr has only 2 records comparing to the 2 unique records in the list
 
How do I do this.
Thanks in advance
Not able to use
Schema.DescribeFieldResult f = Schema.sObjectType.Account.fields.Name;
in an apex code.
 
 
I want to store the field name in a variable and use it in SOQL to make it dynamic
I have requirement to return an SObject and two variables in a web service. How do I cater to this problem.
What is the number of SOQL I can write in a web service.
The query
 
opportunity opp=[select name, (select count() from opportunity), stagename from opportunity];
 
is giving error
 
Error: Compile Error: Didn't understand relationship 'opportunity' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 12 column 21
 
 
Thanks in advance
I have web service in SFDC which willbe accessed by UI in java by n number of users(concurrently)
 
global class Pipeline {

  WebService static opportunity[] Apptaker(string adid, string Ftype, date Frmdt, date todt, string stype, string sorder) {

opportunity[] opp;
SOQL1
 
return opp;
}
 
 
 
There is only one SOQL1 in the code which will be executed.
Now for concurrent callouts to the API do I need to incorporate for loops.
In case for loop is placed, shall I see the error of governor limits in number of SOQL queries per code.
  • June 06, 2008
  • Like
  • 0
I have a web service in SFDC. it is being called by external java app. inputs are sent into web service and output is returned as sobject.
Eg
global class Pipeline {

  WebService static opportunity[] Apptaker(string adid, string Ftype, date Frmdt, date todt, string stype, string sorder) {

opportunity[] opp;
...........
.........
 
return opp;
}
 
 
 
Now I have not handled exceptions. In case there is any exception from web service, how do I return error to the UI java app
  • June 06, 2008
  • Like
  • 0