• Suzan2009
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies

Hi Guys,

 

I have a vf page which contains <script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script>

 

The Vf page works fine in IE7 but in IE8 I keep getting the error:

 

Exception thrown and not caought
connection.js
code:0
URI:https://c.na7.visual.force.com/soap/ajax/15.0/connection.js

 

anyone has idea??

 

hi guys,

 

I got a problem with textarea field query in Apex.

Becaus textarea field is not filterable, I try to use SOSL. According to this page I have to use IN ALL FIELDS so as to search on textarea fields.  http://www.salesforce.com//us/developer/docs/api/Content/sforce_api_calls_sosl_about.htm 

 

in my instance I got over 100000 contacts. There may be more than 1000 records returned if searching on IN ALL FIELDS. However just in few of them the specific textarea field contains the search string "%xxxx%". So finally in fact, there is no more than 1000(can be stored in to a list) meeting the criteria.

 

Is there any better way to solve this problem. Thanks in advance

 

 

 

Hi Guys,

 

I have 2 picklists on Account. One is "Industry" -- controlling field, the other is "Sector" -- dependent field.

For example,

 

When I choose "IT" for Industry, the Sector will show Database, CRM sys, NetWork etc.

When I choose "Education" for Industry, the Sector will show something .....

all those above are set up in field definition in Setup.

 

I wonder whether there is a way to get their relationship. I mean I hope Apex can help  show which picklist value in industry controlls which values in Sector.

 

 

Thanks

 

Any idea will be goooooooooooooooooooood!!

Hi Guys,

 

The senario is below. Please have a look and give me any idea. If that sounds impossilbe, other ways will be appreciated. Thanks

 

-- two Salesforce instances, one as server and the other as client

-- some apex class in server will be called using webservice technique by client apex controller + visualforce page(client app).

 

is it possible? How can I get client app login the Server first to get session Id. The app needs to get authorisation anyway.

 

Thanks  

 

Suzan

Hi Guys,

 

The senario is below. Please have a look and give me any idea. If that sounds impossilbe, other ways will be appreciated. Thanks

 

-- two Salesforce instances, one as server and the other as client

-- some apex class in server will be called using webservice technique by client apex controller + visualforce page(client app).

 

is it possible? How can I get client app login the Server first to get session Id. The app needs to get authorisation anyway.

 

Thanks  

 

Suzan

 Hi I am trying to excute this SOSLbutit will give error.

 

       String searchquery='FIND \'KS*\' IN billingstate  FIELDS RETURNING Account(id,Name,billingstate)';
       List<List<SObject>> searchList=search.query(searchquery);
     
        Accounts  = ((List<Account>)searchList[0]);

 

ERROR : 

 

System.Exception: Invalid IN fields group: billingstate

Class.customSearchcls.Search1: line 23, column 39 External entry point

 

But its working fine with Name.

 

  • November 11, 2009
  • Like
  • 0

Hi Guys,

 

The senario is below. Please have a look and give me any idea. If that sounds impossilbe, other ways will be appreciated. Thanks

 

-- two Salesforce instances, one as server and the other as client

-- some apex class in server will be called using webservice technique by client apex controller + visualforce page(client app).

 

is it possible? How can I get client app login the Server first to get session Id. The app needs to get authorisation anyway.

 

Thanks  

 

Suzan

Hi,

 

As you all know Salesforce is phasing out s-control next year, so I am given the task to convert one functionality written in S-control to VF page.

 

My object is select more then 10000 records from the object (lets say my object 30000 records). Even consider by applying all filter criteria SOQL still need to fetch more than 10000 rows.

 

But when I try to select more then 10000 records using SOQL, apex throw a limit exception to me.

So any idea how we can select more then 10000 records in VF/Apex solution.

 

Any suggestion is appreciable.

 

Thanks

Rajan

I am having a word document stored in Document object. I need to retrieve only the content and display it in a VF page.

I have written the query in a controller class to get the body of the document. The body is returning as Blob data type. Then I am converting the Blob to String using ToString() method in Apex.

Code for your reference:
----------------------------------
Document d = [Select body, bodyLength, ContentType, Url from Document where id = :'01580000000n17L'];
Blob b = d.body;
String s = b.toString();

But the output is showing as more encoded characters along with the content. These encoded characters, I suppose, are meta-data for the word document like font properties, alignment, etc. I need only the content of the document.

In the same way, if I use a Notepad file to get the content, it is working fine and I get only the content.

Please tell me a way to get the content only from a Word document without the encoded characters.

Note : Following is a small development being carried out to demystify salesforce apex webservice and callout features, please correct me if you find my understanding to be incorrect.

 

I am trying to integrate two Salesforce Orgs using Apex. Apex supports both callouts and webservices, then why not leverage both to achieve a 360 connectivity between two Salesforce instances.

 

Org1 : Create a Apex Web Service, Generate its WSDL

global class AccountPlan {

webservice String area;
webservice String region;

//Define an object in apex that is exposed in apex web service
global class Plan {
webservice String name;
webservice Integer planNumber;
webservice Date planningPeriod;
webservice Id planId;
}

webservice static Plan createAccountPlan(Plan vPlan) {

//A plan maps to the Account object in salesforce.com.
//So need to map the Plan class object to Account standard object
Account acct = new Account();
acct.Name = vPlan.name;
acct.AccountNumber = String.valueOf(vPlan.planNumber);
insert acct;

vPlan.planId=acct.Id;
return vPlan;
}

}

 

Org2:  Consume above generated WSDL to generate following Apex Class viz.,AccountPlanClasses

public class AccountPlanClasses {
public class LogInfo {
public String category;
public String level;
private String[] category_type_info = new String[]{'category','http://soap.sforce.com/schemas/class/TCSSAAS/AccountPlan','LogCategory','1','1','false'};
private String[] level_type_info = new String[]{'level','http://soap.sforce.com/schemas/class/TCSSAAS/AccountPlan','LogCategoryLevel','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://soap.sforce.com/schemas/class/TCSSAAS/AccountPlan','true','false'};
private String[] field_order_type_info = new String[]{'category','level'};
}
public class AllowFieldTruncationHeader_element {
............................
............................

 

Now lets try to connect to Org1 from Org2

AccountPlanClasses.Plan plan = new AccountPlanClasses.Plan();
plan.name = 'Chirag';
plan.planNumber = 111;
AccountPlanClasses.AccountPlan a = new AccountPlanClasses.AccountPlan();
a.createAccountPlan(plan);

 

Execution of above code runs into following error

WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor= 

 

I to feel that somewhere I am missing User Credentials to be supplied, but I dont know exactly where. Please guide me to complete this 360 connectivity between two orgs using Apex.

Message Edited by Chirag Mehta on 05-05-2009 06:13 AM
Message Edited by Chirag Mehta on 05-12-2009 07:52 PM

Hello Friends,

 

I know that there is a limit of 10000 rows for SOQL query.

But I have more than 10000 rows to process, how can I do that in pure VF/Apex approach.

 

Thanks,

Sunil