• jesperfj
  • NEWBIE
  • 49 Points
  • Member since 2008


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 23
    Replies

Hi,

 

Is there a library or implementation of OAuth protocol using Apex?

 

I'm writing OAuth Consumer using Apex and Visualforce pages but faced several issues:

 

  * HTTP Redirect function, message-passing using HTTP header etc.

  * Session management (Cookie, Session ID, Session Object etc.)

  * Nonce generation

 

I appreciate your help.

 

Thanks.

 

  • September 04, 2009
  • Like
  • 0
Does anyone know of a way to download View ( i.e., <listView> ) metadata into eclipse for standard objects?

I'm using Eclipse SDK Version 3.3.2 to try to retrieve as much metadata as I can about our production instance.  When I refresh our custom objects into eclipse, all Views for a given object are included.  Here's an example of one:

   <listViews>
        <fullName>AllOffBoardingRequests</fullName>
        <columns>NAME</columns>
        <columns>Existing_Employee_Name__c</columns>
        <columns>Expected_Work_End_Date__c</columns>
        <columns>Reports_To_Contact__c</columns>
        <columns>Department__c</columns>
        <columns>OWNER.ALIAS</columns>
        <columns>Status__c</columns>
        <columns>Effective_Date__c</columns>
        <columns>Start_Date__c</columns>
        <columns>Request_Date__c</columns>
        <filterScope>Everything</filterScope>
        <filters>
            <field>RECORDTYPE</field>
            <operation>equals</operation>
            <value>Employee_On_Boarding_Form__c.OffBoarding</value>
        </filters>
        <label>All Off-Boarding Requests</label>
    </listViews>

The same type of View metadata does _not_ appear automatically when I download our standard objects into eclipse, and I can't figure out why.

Thanks.

Hey all,

 

I've been searching all over for this answer to no avail. When I generate .java files from the partner .wsdl, what is the license type for the .java files? Are they considered public domain, or is there an open-source license I can distribute it under?

 

I have a customer that wants to remove anything from my distribution that does not have an explicit license, and this is a blocker for me.

 

Note - this isn't an explicit cross-post - I asked a similar question in the General forum several days ago asking about the license type for the .wsdl files (no answers to that thread). This is ultimately what I'm looking to get an answer to.

 

Finally - if you don't have an answer, but can tell me where to find the answer (or who to contact at sf.com), I'd be most grateful.

 

Thanks!

Hi All

 

I have a server side application and a client side application I wrote in salesforce.

 

In order my server will get data from the user's salesforce, I need the user's token and password.

 

Is there any way, after the user installs my salesforce app, to send the user's personal data (name, email) and token and password to my server.

 

Without forcing the user to some "register" button, that sends the data to my server.

 

I don't want to force the user, after the app installation, to do more registration steps..

 

Can I avoid it by any way???

 

Thanks in advance

guy

Hi ,

            We have our  application(financial Application) build on Spring 3.0 . Can we put this on AppExchange directly without waiting for VMForce(the cloud for java app) ? Is there any other alternate of VMForce ? We are very keen to put out application on AppExchange for marketing purpose . plz help ...............

Hi, all. I'm wondering about integration between on-premise Java application and Force.com application.
I watched VMForce webinar, in it's demo, web app deployed on local tcServer connected to Force.com DB using JPA. (but development purpose)

 

Is it possible that integrating  on-premise Java application and Force.com DB using JPA(DataNucleus) in production ?

  • September 30, 2010
  • Like
  • 0

I am coding bulk operations through version 18 of the Bulk API.  A job is submitted with one or more batches.  If a batch fails because it could not be processed the batchInfo result returns the Failed state and puts the reason why the batch was not run in the stateMessage.  That is all good.  However if the batch runs, but one or more records in the batch fails, I don't see how to get the reason why the particular record fails.  Processing the batch results shows that the record failed, but it does not give a reason.  Is there a way to get the error message for a particular row of a batch?

 

 

Hi,

When I run this command

 

java -classpath c:\wsc-18.jar;JAVA_HOME/lib/tools.jar com.sforce.ws.tools.wsdlc c:\enterprise.wsdl c:\Enterprise.jar

 

I got error

 

[WSC][wsdlc.run:311]Created temp dir: C:\DOCUME~1\PICH\LOCALS~1\Temp\wsdlc-t
emp-3921276044750449158-dir
[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 347 java files.
Exception in thread "main" java.io.FileNotFoundException: Unable to find file: c
om/sforce/ws/tools/aggregateResult.template
        at com.sforce.ws.template.Template.createInputStream(Template.java:129)
        at com.sforce.ws.template.Template.exec(Template.java:88)
        at com.sforce.ws.tools.wsdlc.generateAggregateResult(wsdlc.java:151)
        at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:85)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:311)
        at com.sforce.ws.tools.wsdlc.main(wsdlc.java:302)

 

 

Location of tools.jar, wsc-18.jar and enterprise.wsdl is correct.

Here is the instruction link that I follow http://wiki.developerforce.com/index.php/Force.com_for_Google_App_Engine_Setup_Guide_Java

 

Thanks

Pich

  • April 30, 2010
  • Like
  • 0

Hey guys,

 

 

I'm trying to figure out how to do this type of thing ...

http://blogs.msdn.com/pedram/archive/2008/04/21/how-to-consume-rest-services-with-wcf.aspx

 

for salesforce, but can't seem to figure out the url i need to build prior to making the request.

 

I have built some async code based on creating the web reference and making standard web service calls but can't seem to match the performance put out by the APEX data loader.

 

I've looked around and found that from the code (what little i actually understand of java) and some forum threads on here the data loader effectively uses 2 threads, 1 to pull the data and a second to save it locally i can see that in the code:

http://sourceforge.net/projects/sforce-app-dl/files/

 

I'm trying to do the same thing but i'm dumping the data to a SQL server database this end instead of a CSV file.

Whilst my code works it's nowhere as efficient as the data loader and i can't seem to figure out why.

 

Essentially my code works by doing the following:

1. make async query

2. when response comes back call "querymoreasync" (recursive until query completes)

3. on another thread save the results

 

I figured this would at least come close to the dataloader but it somehow is about 5 times slower :(

 

When I dug a bit deeper I found that the data loader actually requests then handles the data as a stream, i'm not actually handling the stream at the moment in favour of relying on .NET's generated classes from my web reference which could explain some of the performance hit.

 

Anyone else trying to do this?

Any ideas?

 

 

Are the new aggregate queries supposed to work with batch apex?  I didn't find anything that says it is unsupported, but I sent a "group by rollup" query to a batch class, and got this error:

 

System.Exception: Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch

 

Any ideas?

 

hi All,

I am trying to use Bulk API and I have a scenario while upserting a Contact record I need to add reference to  Account using External ID. I did this using regular WebService API, but unable to do the same using Bulk API

 

as com.sforce.async.SObject does not have a method setField(String fieldName, SObject value). I was able do this with com.sforce.soap.partner.sobject.SObject

 

Any help or suggestions on this is appreciated.

 

Thanks in advance,

Ramana Maddikunta 

 

  • January 12, 2010
  • Like
  • 0

Hello,

 

I'm reviewing the new Bulk API being prepared for Winter '10 release and I see one major limitation. It expects the number of batches to be sent in advance. This implies you must have all data you want to load in advance, so you can determine how many batches you will need to upload the data. This requirement makes the Bulk API not usable when you want to stream data, without knowing in advance how much total data you have.

 

My question is to the developers of the Bulk API. Is there time left to extend the API to allow streaming of data? Is it possible to remove this requirement to submit the number of batches in advance?

  • September 10, 2009
  • Like
  • 0

Hi,

 

Is there a library or implementation of OAuth protocol using Apex?

 

I'm writing OAuth Consumer using Apex and Visualforce pages but faced several issues:

 

  * HTTP Redirect function, message-passing using HTTP header etc.

  * Session management (Cookie, Session ID, Session Object etc.)

  * Nonce generation

 

I appreciate your help.

 

Thanks.

 

  • September 04, 2009
  • Like
  • 0

I have some before and after insert triggers on Contact. When a Contact is imported via the Account/Contact import wizard, the triggers don't behave as expected. All my tests are passing--one-offs and bulk.

 

My question is, how do I troubleshoot a problem like this? I can't write a test that uses the import wizard. Import wizard DMLs don't appear to be recorded in the debug log. I'm not sure where the dupe checking of the import wizard fits in the execution stack--it's not listed in the Apex docs that talk about execution order.

 

Is there any way for me to see what might be happening here?

 

Thanks,

Steve 

When i try to run the ant scripts that should initialize my org for the hands-on exercises, they always fail (apart from the one for chapter 3). this is the output i get when i try to initialize for chapter 12 (ant Chapter12):

Buildfile: build.xml

Chapter12:
     [echo] This command will add all the entities you will need for the exercises in Chapter 12 into your target organization.  The target organization is identified by the sf.username and sf.password in the build.properties file.             
     [echo]    
    [input] Press any key to continue . . .

BUILD FAILED
C:\Data\Docs\Tutorials\force.com\The Developer's Guide to the Force.com Platform\DevGuide\build.xml:125: Failures:
objects/Candidate__c.object(Candidate__c):The sharing model cannot be updated through the API currently.
objects/Job_Application__c.object(Job_Application__c):The sharing model cannot be updated through the API currently.
objects/Position__c.object(Position__c):The sharing model cannot be updated through the API currently.
objects/Position_Type__c.object(Position_Type__c.Department__c):Cannot change field type of a custom field referenced in Apex class or trigger: <a href="/01p8000000098R3">positionExtension</a>
reports/Chapter_Six/Open_positions.report(Chapter_Six/Open_positions):In field: Position__c.Open_Position_Date__c - no CustomField named Position__c.Open_Position_Date__c found
reports/Chapter_Six/Open_positions_by_days_since_posted.report(Chapter_Six/Open_positions_by_days_since_posted):In field: Position__c.Days_Since_Posting__c - no CustomField named Position__c.Days_Since_Posting__c found
reports/Chapter_Six/Open_positions_by_department.report(Chapter_Six/Open_positions_by_department):In field: Position__c.Days_Since_Posting__c - no CustomField named Position__c.Days_Since_Posting__c found
layouts/Candidate__c-Candidate Layout.layout(Candidate__c-Candidate Layout):In field: field - no CustomField named Candidate__c.Address__c found
layouts/Location__c-Location Layout.layout(Location__c-Location Layout):Invalid related list:Position__c.Location__c
layouts/Position__c-Non-technical Position Layout.layout(Position__c-Non-technical Position Layout):Field:Name must not be Readonly
layouts/Position__c-Position Layout.layout(Position__c-Position Layout):Field:Name must not be Readonly
workflows/Position__c.workflow(Position__c.Close out position):Invalid literal value for picklist:Closed
workflows/Position__c.workflow(Position__c.Open Position):Invalid literal value for picklist:Open
workflows/Position__c.workflow(Position__c.Set Open Position Date):In field: field - no CustomField named Position__c.Open_Position_Date__c found
workflows/Position__c.workflow(Position__c.Set substatus):In field: field - no CustomField named Position__c.Sub_status__c found
workflows/Position__c.workflow(Position__c.14 Days Later):Picklist value does not exist
workflows/Position__c.workflow(Position__c.Application Notification):Field Number_of_Applications__c does not exist. Check spelling.
workflows/Position__c.workflow(Position__c.Close position):In field: field - no CustomField named Position__c.Number_of_Applications__c found
classes/dataLoadController.cls(109,21):No such column 'Legacy_ID__c' on entity 'Position__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
profiles/Admin.profile(Admin):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/ContractManager.profile(ContractManager):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/Custom%3A Marketing Profile.profile(Custom%3A Marketing Profile):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/Custom%3A Sales Profile.profile(Custom%3A Sales Profile):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/Custom%3A Support Profile.profile(Custom%3A Support Profile):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/CustomerManager.profile(CustomerManager):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/MarketingProfile.profile(MarketingProfile):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/Partner.profile(Partner):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/ReadOnly.profile(ReadOnly):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/SolutionManager.profile(SolutionManager):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/Standard.profile(Standard):In field: recordType - no RecordType named Position__c.Non_technical_position found
profiles/StandardAul.profile(StandardAul):In field: recordType - no RecordType named Position__c.Non_technical_position found
objects/Interview__c.object(Interview__c.Interviewer__c):There is already a field named Interviews on User.


Total time: 21 seconds


I believe the problem is because "The sharing model cannot be updated through the API currently.", but i dont know what this error massage mean and what to do to solve the problem..

thanks,
Alon
  • January 16, 2009
  • Like
  • 0