• talanb
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 10
    Replies
Has anyone got this to work? I finally got it installed, but all it does is throw errors.

If I try to create a new AppExchange project, after I enter my project name and login info, I get a dialog that says "Invalid Thread Access" and I can't go any farther.

If I try to open the Schema Browser view, I get an error that says:

Unable to create view: Plug-in com.appexchange.toolkit was unable to load class com.appexchange.plugin.views.SchemaView.

This is using Eclipse 3.1.2 (the only version that I could get it successfully installed on).

I'd love to hear from anyone that is using this!

Thanks!

Todd Breiholz
Meredith Corporation
  • March 22, 2006
  • Like
  • 0
I have an s-control that as part of it's processing add's a couple of OpportunityShare objects for an Opportunity. While testing, everything seemed to be working fine, but when we pushed it out for general use, it fails when creating the OpportunityShares. Further research shows that when logging in as one of our "Normal" users the OpportunityShare object does not appear to be available through the API (evidenced by the fact that it does not appear in the object tree in sforce explorer when logged in as that user. Logged in as myself (an administrator) I can see the object.

Are there any restrictions that I am not aware of for creating objects of type OpportunityShare through the API?

Thanks

Todd Breiholz
Meredith Corporation
  • October 02, 2005
  • Like
  • 0
The SoapFault object does not appear to be getting set correctly in all cases. I am seeing a SoapFault object returned from Create with a blank faultcode and faultstring, but the SOAP XML I get back is the following:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>java.lang.NumberFormatException: empty String</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Thanks!

Todd Breiholz
Meredith Corporation
  • August 19, 2005
  • Like
  • 0
I'm loving the new AJAX toolkit! However, I am running into an issue with the following code excerpt. I am looping through currentReps (which is queryResult.records array). For each record, I create a new DynaBean and set some data. The call to getUserQuota does another sforceClient.Query(...) and returns the first record returned.

When getUserQuota() returns, it looks like my estimateSplit (which should be of type Estimate_Split__C) DynaBean has been magically transformed into type User_Quota__c.

Is there a limitation on writing re-entrant code with the library? If so, is there a way to get around this?

Thanks

Todd Breiholz
Meredith Corporation


function convertToEstimateSplits(currentReps) {
var estimateSplits = new Array(currentReps.length);
var i;
for (i = 0; i < currentReps.length; i++) {
var estimateSplit = new DynaBean("Estimate_Split__c");
var advSplit = currentReps[i];
alert("stop");
estimateSplit.set("estimate_net_net_revenue__c", opportunityNetNetRevenue);
estimateSplit.set("ownerid", advSplit.salesrep__c);
estimateSplit.set("pub_issue__c", campaignId);
estimateSplit.set("estimate_split__c", advSplit.advsrep_accnt_prcnt__c);
var quota = getUserQuota(estimateSplit.ownerid);
if (quota != null) {
estimateSplit.set("split_rep_fiscal_quota__c", quota.quota_amount__c);
estimateSplit.set("estimate_quota_fy__c", quota.quota_fy__c);
}
estimateSplits[i] = estimateSplit;
}
return estimateSplits;
}
function getUserQuota(userId) {
var fiscal = accountingPeriodToFiscal();
var userQuotaResult = sforceClient.Query("select Quota_Amount__c, Quota_FY__c from User_Quota__c where Quota_FY__c = '" +
fiscal +
"' and User__c = '" +
userId +
"'");
return userQuotaResult.records[0];
}
  • August 18, 2005
  • Like
  • 1
I'm loving the new AJAX toolkit! However, I am running into an issue with the following code excerpt. I am looping through currentReps (which is queryResult.records array). For each record, I create a new DynaBean and set some data. The call to getUserQuota does another sforceClient.Query(...) and returns the first record returned.

When getUserQuota() returns, it looks like my estimateSplit (which should be of type Estimate_Split__C) DynaBean has been magically transformed into type User_Quota__c.

Is there a limitation on writing re-entrant code with the library? If so, is there a way to get around this?

Thanks

Todd Breiholz
Meredith Corporation


function convertToEstimateSplits(currentReps) {
var estimateSplits = new Array(currentReps.length);
var i;
for (i = 0; i < currentReps.length; i++) {
var estimateSplit = new DynaBean("Estimate_Split__c");
var advSplit = currentReps[i];
alert("stop");
estimateSplit.set("estimate_net_net_revenue__c", opportunityNetNetRevenue);
estimateSplit.set("ownerid", advSplit.salesrep__c);
estimateSplit.set("pub_issue__c", campaignId);
estimateSplit.set("estimate_split__c", advSplit.advsrep_accnt_prcnt__c);
var quota = getUserQuota(estimateSplit.ownerid);
if (quota != null) {
estimateSplit.set("split_rep_fiscal_quota__c", quota.quota_amount__c);
estimateSplit.set("estimate_quota_fy__c", quota.quota_fy__c);
}
estimateSplits[i] = estimateSplit;
}
return estimateSplits;
}
function getUserQuota(userId) {
var fiscal = accountingPeriodToFiscal();
var userQuotaResult = sforceClient.Query("select Quota_Amount__c, Quota_FY__c from User_Quota__c where Quota_FY__c = '" +
fiscal +
"' and User__c = '" +
userId +
"'");
return userQuotaResult.records[0];
}
  • August 18, 2005
  • Like
  • 1
I have had a .Net interface application running for some months and now suddenly the last three days, I get an error 'jave heap space' from this piece of code (and other places):
 

Try

Dim qr As sForce.QueryResult = sf.query( _

"select " & sfAccountFields & " from Account " & _

"where BackOfficeId__c = '" & Trim(strBackOfficeId) & "' and " & _

"SSU__c = '" & strSSU & "'")

If (qr.size = 0) Then Return Nothing

If (qr.size > 1) Then

LogError("Warning: Multiple Accounts with BackofficeId " & Trim(strBackOfficeId))

End If

Return CType(qr.records(0), sForce.Account)

Catch ex As Exception

LogError("GetAccount: Failed to retrieve BackOfficeId: " & strBackOfficeId)

LogError("Error message: " & ex.Message & vbCrLf)

End Try

 

Any ideas?

 

Regards,

Per

  • May 25, 2006
  • Like
  • 0
How can I return the salesforce id from sales force when I create a new lead through a web application? So as soon as I do this:
 
<code>
 
// Add the account to an array of SObjects
Sforce.sObject[] records = new Sforce.sObject[] {sfLead};

// Invoke the create call, passing in the account properties and saving the results in a SaveResult object Sforce.SaveResult[] saveResults = binding.create(records);

</code>

Can salesforce return the id?

  • April 13, 2006
  • Like
  • 0
Has anyone got this to work? I finally got it installed, but all it does is throw errors.

If I try to create a new AppExchange project, after I enter my project name and login info, I get a dialog that says "Invalid Thread Access" and I can't go any farther.

If I try to open the Schema Browser view, I get an error that says:

Unable to create view: Plug-in com.appexchange.toolkit was unable to load class com.appexchange.plugin.views.SchemaView.

This is using Eclipse 3.1.2 (the only version that I could get it successfully installed on).

I'd love to hear from anyone that is using this!

Thanks!

Todd Breiholz
Meredith Corporation
  • March 22, 2006
  • Like
  • 0
Hello all, I am trying to do a simple query like select * from contracts, accounts where contracts.accountid = accounts.id and its not working. Any ideas why this is not working?

Thanks
Jason
I have created a class called WebLead which inherits sforce.Lead.

When I atttempt to pass the derived class to create() I get an error that 'WebLead was found, expected sforce.Lead'. I have tried explicitly casting WebLead to it's base class but I still get the same error.

Ideally I want to something do this:

class WebLead : Lead
{
public Save()
{
sObject[] obj = { this };

sforce.create(obj)
}
}

instead I have to do

class WebLead : Lead
{
public Save()
{
Lead myLead = new Lead();
myLead.FirstName = this.FirstName;
myLead.LastName = this.LastName;
//etc.. ad nauseum

sObject[] obj = { myLead };

sforce.create(obj)
}
}

Any ideas here?
Hi. I'm using the Ruby SOAP4r library with the Enterprise portal to try to add a new Opportunity. I create a new Opportunity object and add all the fields that SalesForce appears to require:


opp = Opportunity.new
class << opp
attr_accessor :accountId, :amount, :name, :closeDate, :stageName
end

opp.accountId = the_account
opp.amount = "3.14"
opp.name = "Test from script"
opp.closeDate = "2005-8-25"
opp.stageName = "Closed Won"

binding.create(Create.new([opp]))


But I consistently see the error message "common.exception.ApiException: Must send a concrete entity type. (SOAP::FaultError)". I don't get it. What could be more concrete than an Opportunity? How can I find out what piece of information SForce is missing? Should I add more fields? Which ones?

Before you ask, yes, I've regenerated my WSDL files and rerun wsdl2ruby.
  • August 26, 2005
  • Like
  • 0
The SoapFault object does not appear to be getting set correctly in all cases. I am seeing a SoapFault object returned from Create with a blank faultcode and faultstring, but the SOAP XML I get back is the following:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>java.lang.NumberFormatException: empty String</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Thanks!

Todd Breiholz
Meredith Corporation
  • August 19, 2005
  • Like
  • 0
I'm loving the new AJAX toolkit! However, I am running into an issue with the following code excerpt. I am looping through currentReps (which is queryResult.records array). For each record, I create a new DynaBean and set some data. The call to getUserQuota does another sforceClient.Query(...) and returns the first record returned.

When getUserQuota() returns, it looks like my estimateSplit (which should be of type Estimate_Split__C) DynaBean has been magically transformed into type User_Quota__c.

Is there a limitation on writing re-entrant code with the library? If so, is there a way to get around this?

Thanks

Todd Breiholz
Meredith Corporation


function convertToEstimateSplits(currentReps) {
var estimateSplits = new Array(currentReps.length);
var i;
for (i = 0; i < currentReps.length; i++) {
var estimateSplit = new DynaBean("Estimate_Split__c");
var advSplit = currentReps[i];
alert("stop");
estimateSplit.set("estimate_net_net_revenue__c", opportunityNetNetRevenue);
estimateSplit.set("ownerid", advSplit.salesrep__c);
estimateSplit.set("pub_issue__c", campaignId);
estimateSplit.set("estimate_split__c", advSplit.advsrep_accnt_prcnt__c);
var quota = getUserQuota(estimateSplit.ownerid);
if (quota != null) {
estimateSplit.set("split_rep_fiscal_quota__c", quota.quota_amount__c);
estimateSplit.set("estimate_quota_fy__c", quota.quota_fy__c);
}
estimateSplits[i] = estimateSplit;
}
return estimateSplits;
}
function getUserQuota(userId) {
var fiscal = accountingPeriodToFiscal();
var userQuotaResult = sforceClient.Query("select Quota_Amount__c, Quota_FY__c from User_Quota__c where Quota_FY__c = '" +
fiscal +
"' and User__c = '" +
userId +
"'");
return userQuotaResult.records[0];
}
  • August 18, 2005
  • Like
  • 1