• pfarrell
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 22
    Replies
I have created an App Ex application and some packages.  I would like to download the files I have created to back up my work off of Salesforce's servers.  I can't find a method to easily do this.  Is there some way to download a tar/zipped archive of my work for offsite backup?
I fixed a bug in my code yesterday and wanted to verify the reason this situation was happening because it might be an issue with Salesforce SOA.

I autogenerated Apex code from a WSDL.  This original WSDL included an object called EmailAddress with two String member variables, Address and Name.  When I generated Apex code, I noted that the Name member variable was altered to Name_x (presumably to prevent collison).

When I used the WSDL in my code, I noted that values added to the Name_x property were not sent with web service calls.

To remedy, I altered the member variable in my web service from Name to DisplayName, regenerated the Apex code from WSDL (which did not append a _x to the member variable) and then altered the code that utilized the generated Apex code.  Values were then sent across the wire.

My feeling is that the Apex code generator prevents name collisions by altering member variable names (by appending _x) but when it comes time to utilize the external web service, the Apex code fails to translate the member variable name back.

I can provide example code if needed.
I have recently finished a proof of concept application utilizing Salesforce SOA, Apex Code, S-Controls, Custom Objects, Workflow Rules, and Outbound Messages.  I found AppExchange to be the perfect avenue for deploying my work to other accounts, however I couldn't figure out how to package my Apex Code in the deployment. I found the ability to include all the other objects, but did I miss the Apex Code inclusion interface when creating my package?

I have found hints that there exists server-side replacement when rendering S-Controls in the docs.

For instance, {!API.Session_ID} is replaced by the actual session Id when an S-Control is rendered.

I can't find a reference doc that lists what the current system merge fields are (i.e. for Winter '07). Can anyone point me in the right direction?

Message Edited by pfarrell on 09-12-2007 07:46 AM

Message Edited by pfarrell on 09-12-2007 07:47 AM

Message Edited by pfarrell on 09-12-2007 07:47 AM

I am trying to use a remoteFunction to get the names and ids of reports currently available to the logged in account.  Here's the function I'm using
Code:
sforce.connection.remoteFunction({
async : false,
//mimeType: 'text/xml',
cache : true,
url : '{!API.Partner_Server_URL_60}'.substring(0,26) + '/servlet/servlet.ReportList?sessionid={!API.Session_ID}',
onSuccess : reportsReady,
onFailure : errorReport
});

function reportsReady(response) {
alert(response);
}

function errorReport(error) {
alert('error:' + error);

When I load the generated url in a browser, I get an xml listing of my account's reports.  When run through AJAX,  it generates the errorReport with the following response:
Code:
<xml version="1.0">
<result>
</result>
Does anyone see anything wrong with the way I'm going this?

Message Edited by pfarrell on 09-12-2007 07:08 AM

I have been working under the impression that Salesforce SOA does not support WSS security tokens while making external Web Service calls in Apex.  I haven't seen anything in the docs about SOA supporting WSS.

I wanted to get confirmation that this is accurate, that SOA cannot create and include WSS 1.0 security tokens in requests to Web Services.
I wanted to verify that my findings are accurate. Can I have multiple sequence elements in the object output by my WSDL when generating APEX code? I am working with an existing WSDL and would like to utilize it within Apex. I get the following error when autogenerating Apex code from the WSDL

Unsupported WSDL. Operation '[operation name]' has more than one output element.

I tweaked the WSDL until I got it working and found that this error related to the number of elements contained in the sequence of the object type being returned by my WSDL.

Here is the solution I came up with for fixing the WSDL, but the problem remains that SOA appears to have a restriction on how my WSDL can be constructed. I wanted to verify if my findings are accurate.
I am generating Apex code from a WSDL file.  Salesforce SOA does not support mulitple bindings, portTypes, or services in a wsdl file.  When I have a WSDL file that only includes Soap 1.2 portType, binding, and service, I get the following error while generating Apex code

Error: Internal error, please contact support with error id: [error id]. Error message: Failed to generate Apex code from WSDL

If I generate a WSDL with only Soap 1.1 portType, binding, and service, I get no errors.

Does this mean that Salesfoce SOA does not support Soap 1.2 WSDL files?
I am new to Apex Code development and am trying to get a trigger to call a web service (imported into Apex Code via wsdl).

This is a simple web service hitting http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=51 (a whois lookup service) for a test.

The wsdl imported correctly and I am now trying to utilze the web service in an Apex trigger.  Here's the code for the call.

trigger helloWorldTrigger on Account (before insert) {
Account[] accs = Trigger.new;
MyHelloWorld.addHelloWorld(accs);
}
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger helloWorldTrigger caused an unexpected exception, contact  your administrator: helloWorldTrigger: execution of BeforeInsert caused by: System.CalloutException: Callout from triggers are currently not supported.: Class.wxWhois.whoisSoap.GetWhoIS: line 19, column 13

I'm reading this error as an indication that Apex triggers currently cannot perform an interaction with web services.  Am I interpreting this error correctly?
I'm calling the Retrieve statement in which I'm grabbing quite a few fields, many of which are formula fields and lookup fields to other objects.

Lately I've been getting this error (QUERY_TOO_COMPLICATED) but the API documentation doesn't say exactly what makes the query too complicated.

Is there a hard number of calculated fields (or relationship queries) that can be included in a single Retrieve call?  Does it depend on the complexity of the formulas within the calculated fields?

If anyone can shed more details about what contributes to this error, I would be really grateful.

Mike
I have this problem with salesforce API access from java based on partner WSDL, salesforce support guys cannot resolve this :-(
Really appreciated if anyone can help.

Person Account is a quite new feature from salesforce, and we want to be able to get PersonContactId value from a Person Account based on account ID.  Here is the query which is executed from Java:

QueryResult qr = binding.query("select Id,Name,PersonContactId from Account where id='xxxxxxxxxxxxxxxx'");

And it returned error:

INVALID_FIELD:
select Id,Name,PersonContactId from Account where
^
ERROR at Row:1:Column:16
No such column 'PersonContactId' on entity 'Account'. 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.

But the funny thing is it works if the query is executed from Apex Exlorer 8, i.e., it returned correct PersonContactId value based on account ID.

I also ran describeSObjects() on Account object with java code, and it returns the following fields (Note: it doesn't have any fields when IsPersonAccount = true, including PersonContactId).

############ Account #################
Field name=Id
Field name=Name
Field name=Type
Picklist values =
Item: Prospect
Item: Customer - Direct
Item: Customer - Channel
Item: Channel Partner / Reseller
Item: Installation Partner
Item: Technology Partner
Item: Other
Field name=RecordTypeId
Field references the following objects:
RecordType
Field name=ParentId
Field references the following objects:
Account
Field name=BillingStreet
Field name=BillingCity
Field name=BillingState
Field name=BillingPostalCode
Field name=BillingCountry
Field name=ShippingStreet
Field name=ShippingCity
Field name=ShippingState
Field name=ShippingPostalCode
Field name=ShippingCountry
Field name=Phone
Field name=Fax
Field name=AccountNumber
Field name=Website
Field name=Sic
Field name=Industry
Picklist values =
Item: Agriculture
Item: Apparel
Item: Banking
Item: Biotechnology
Item: Chemicals
Item: Communications
Item: Construction
Item: Consulting
Item: Education
Item: Electronics
Item: Energy
Item: Engineering
Item: Entertainment
Item: Environmental
Item: Finance
Item: Food & Beverage
Item: Government
Item: Healthcare
Item: Hospitality
Item: Insurance
Item: Machinery
Item: Manufacturing
Item: Media
Item: Not For Profit
Item: Recreation
Item: Retail
Item: Shipping
Item: Technology
Item: Telecommunications
Item: Transportation
Item: Utilities
Item: Other
Field name=AnnualRevenue
Field name=NumberOfEmployees
Field name=Ownership
Picklist values =
Item: Public
Item: Private
Item: Subsidiary
Item: Other
Field name=TickerSymbol
Field name=Description
Field name=Rating
Picklist values =
Item: Hot
Item: Warm
Item: Cold
Field name=Site
Field name=OwnerId
Field references the following objects:
User
Field name=CreatedDate
Field name=CreatedById
Field references the following objects:
User
Field name=LastModifiedDate
Field name=LastModifiedById
Field references the following objects:
User
Field name=SystemModstamp
Field name=LastActivityDate
Field name=NumberofLocations__c
Field name=SLAExpirationDate__c
Field name=UpsellOpportunity__c
Picklist values =
Item: Maybe
Item: No
Item: Yes
Field name=SLASerialNumber__c
Field name=SLA__c
Picklist values =
Item: Gold
Item: Silver
Item: Bronze
Item: Platinum
Field name=CustomerPriority__c
Picklist values =
Item: High
Item: Low
Field name=Active__c
Picklist values =
Item: No
Item: Yes
############ Account #################
  • February 11, 2008
  • Like
  • 0
I fixed a bug in my code yesterday and wanted to verify the reason this situation was happening because it might be an issue with Salesforce SOA.

I autogenerated Apex code from a WSDL.  This original WSDL included an object called EmailAddress with two String member variables, Address and Name.  When I generated Apex code, I noted that the Name member variable was altered to Name_x (presumably to prevent collison).

When I used the WSDL in my code, I noted that values added to the Name_x property were not sent with web service calls.

To remedy, I altered the member variable in my web service from Name to DisplayName, regenerated the Apex code from WSDL (which did not append a _x to the member variable) and then altered the code that utilized the generated Apex code.  Values were then sent across the wire.

My feeling is that the Apex code generator prevents name collisions by altering member variable names (by appending _x) but when it comes time to utilize the external web service, the Apex code fails to translate the member variable name back.

I can provide example code if needed.
I am trying to use a remoteFunction to get the names and ids of reports currently available to the logged in account.  Here's the function I'm using
Code:
sforce.connection.remoteFunction({
async : false,
//mimeType: 'text/xml',
cache : true,
url : '{!API.Partner_Server_URL_60}'.substring(0,26) + '/servlet/servlet.ReportList?sessionid={!API.Session_ID}',
onSuccess : reportsReady,
onFailure : errorReport
});

function reportsReady(response) {
alert(response);
}

function errorReport(error) {
alert('error:' + error);

When I load the generated url in a browser, I get an xml listing of my account's reports.  When run through AJAX,  it generates the errorReport with the following response:
Code:
<xml version="1.0">
<result>
</result>
Does anyone see anything wrong with the way I'm going this?

Message Edited by pfarrell on 09-12-2007 07:08 AM

I am looking into how can we authicate salesforce username and password with bulletin board. Has anyone done this before or give me some information.

Thanks.



Is it possible to access Report objects via the API?

That is, I have saved several reports to the Unfiled Public Reports and I would like to be able to get them via the Apex API.
  • August 31, 2007
  • Like
  • 0
Hi Friends
 
I have developed a custom webservice which uses salesforce API's to insert/update data into salesforce from a 3rd party application. Is there any way of hosting this web service on salesforce server itself??
 
If yes, than can i call it from an external application than and how??
 
Also, how can i link my custom web service to APEX??
 
Any pointers would be really helpful .....
 
Kndly help ....
 
Best Regards
Achin
I wanted to verify that my findings are accurate. Can I have multiple sequence elements in the object output by my WSDL when generating APEX code? I am working with an existing WSDL and would like to utilize it within Apex. I get the following error when autogenerating Apex code from the WSDL

Unsupported WSDL. Operation '[operation name]' has more than one output element.

I tweaked the WSDL until I got it working and found that this error related to the number of elements contained in the sequence of the object type being returned by my WSDL.

Here is the solution I came up with for fixing the WSDL, but the problem remains that SOA appears to have a restriction on how my WSDL can be constructed. I wanted to verify if my findings are accurate.
What is he Use Of Apex Code I am new to Apex, please give solutions
I am new to Apex Code development and am trying to get a trigger to call a web service (imported into Apex Code via wsdl).

This is a simple web service hitting http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=51 (a whois lookup service) for a test.

The wsdl imported correctly and I am now trying to utilze the web service in an Apex trigger.  Here's the code for the call.

trigger helloWorldTrigger on Account (before insert) {
Account[] accs = Trigger.new;
MyHelloWorld.addHelloWorld(accs);
}
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger helloWorldTrigger caused an unexpected exception, contact  your administrator: helloWorldTrigger: execution of BeforeInsert caused by: System.CalloutException: Callout from triggers are currently not supported.: Class.wxWhois.whoisSoap.GetWhoIS: line 19, column 13

I'm reading this error as an indication that Apex triggers currently cannot perform an interaction with web services.  Am I interpreting this error correctly?
Hi All
 
I am attempting to use the AJAX proxy to make a call out of an SObject to a Dot-Net Web Service. Originally I was using an XMLHttpRequest, but soon found out the problems with CROSS DOMAIN Issues.
 
I am now using a "New"  call   sforce.connection.remoteFunction and the AJAX Proxy.
 
I am running into an error .... Endpoint Mismatch:
 
400 Endpoint protocol(http/https) mismatch: http://www.myDomain.net/service.asmx
I am assuming that this is taking place because the Dot-Net Service is using  HTTP and SalesForce is using HTTPS  (https://na4.salesforce.com/home/home.jsp).
 
Any insight into how to resolve this would be greatly appreciated.
 
Thanks
 
Pat Mackin