-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
13Questions
-
240Replies
Bug in update?
I am trying to update a record of a custom object type.
The "Name" of the custom object type is set to be an auto-generated ID.
Sequence:
Retrieve() the required columns of obejct using ID.
This includes the Name field.
Update() a field (in this case "collected amount").
The update() call callbacks to my onSuccess handling function (i.e. no error reported) but the update fails.
If I remove the Name field from the object (by creating a new one and setting ID) then there is no issue everything works as expected.
I am not affected by this error now, but I think the API / AJAX code is not throwing on the attempt to update the auto generated NAME field which makes the update call fail.
-
- Gareth Davies
- May 29, 2007
- Like
- 0
- Continue reading or reply
Brain problem - how do I expose an APEX verb via the API?
I am taking baby steps with APEX - having now created and run triggers I have progressed to creating a package and want to expose it via the API.
This is the package which saves without Error from Eclipse.
Code:
package GWDWebServiceTest{ webService Id GWDTest(String lastName, Account a) { Contact c = new Contact (LastName = lastName, AccountId = a.Id); insert c; commit; return c.id; } }I expected that when I generated the WSDL (Enterprise or Partner, I've tried both) I would see a method called GWDTest (or perhaps GWDWebServiceTest.GWDTest) but I don't. I have checked that I don't have two packages with the same name and I don't (So it's not a name space issue).
I even tried to access it using this piece of AJAX
Code:
<script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/8.0/connection.js"></script> <script src="/soap/ajax/8.0/apex.js"></script> <script language="javascript"> sforce.debug.trace = true; function makeaContact() { alert ("Hi"); try { var account = sforce.SObject("Account"); var id = sforce.apex.execute ("GWDWebServiceTest","GWDTest",{a:"Smith",b:account}); alert (id); } catch (ex) { alert ("Failed : " + ex.message); } } </script>
But I only get the alert that says "Failed: undefined".
Any pointers?
Cheers
Gareth.
-
- Gareth Davies
- February 19, 2007
- Like
- 0
- Continue reading or reply
Counting API calls
-
- Gareth Davies
- November 21, 2006
- Like
- 0
- Continue reading or reply
Open Source Report Scraper from Upside Outcomes
-
- Gareth Davies
- September 09, 2006
- Like
- 0
- Continue reading or reply
AppExchange Platform Feature Suggestion: Name-Value storage.
-
- Gareth Davies
- September 06, 2006
- Like
- 0
- Continue reading or reply
Ajax 3.3 Beta - FireFox 1.5 - "Permission denied to call method XMLHttpRequest.open"
var result = sforceClient.login(DebugUser,DebugPass);
Code:
Tester= getXMLHTTPRequest(); Tester.open("get","Sample.xml",false) Tester.send();
Works fine in IE but in FF it throws the same error. FF, it seems, demands a NULL parameter in the send.
Code:
Tester= getXMLHTTPRequest(); Tester.open("get","Sample.xml",false) Tester.send(null);
This works with both . Perhaps this is the issue here as well?
I have no problem using
Code:
sforceClient.init("{!API_Session_ID}","{!API_Partner_Server_URL_70}");
Within an SControl on FF 1.5, so I don't think this is super-urgent, but it would improve things on the testing front here as we have other surpise errors caused by cross-domain calls that are making life difficult enough!
Any comments or suggestions welcomed.
Thanks
Gareth.
Message Edited by Gareth Davies on 06-14-2006 03:30 PM
-
- Gareth Davies
- June 14, 2006
- Like
- 0
- Continue reading or reply
EXCEEDED_MAX_TYPES_LIMIT
binding.describeSObjects(String[] of all ObjectNames)
I guess this has been thrown due to the resulting size of the SOAP message (?)
Message Edited by Gareth Davies on 03-03-2006 03:28 PM
-
- Gareth Davies
- March 03, 2006
- Like
- 0
- Continue reading or reply
Filtering of Tasks by Date: One Year cut off
Hi,
I am with a client who and we want to perform a look back analysis on client activity. Unfortunately the API and, therefore, excel connector does not allow you to query objects with an ActivityDate greater than one year ago.
If we know the ObejctID we can return it through the http://emea.salesforce.com/OBJECTID method but not by specifying the ID to the API. We have determined that the API is automatically filtering all tasks greater than one year when the api query method is used. Is there anyway to bypass this?
I know the data is there, but it appears to be inaccessible other than by doing a screed scrape on the webpage (or waiting for the export files to arrive) as things stand. Any plans to change this, or did I miss something?
Gareth.
-
- Gareth Davies
- July 07, 2005
- Like
- 0
- Continue reading or reply
Automatic Integration with Exchange?
Hi,
Any one know of a way to keep Exchange and SF.com in sync automatically. (not using a manualy triggered Intellisync).
Problem:
Field Salesforce with GPRS enabled outlook devices (Blackberry's, XDA and other).
Want to make sure they are notified when someone else books them for an appointment and when they book an appointment. For various reasons just using Exchange or just using SF.com will not work.
Does anyone know of 3rd party synchronisation tool?
Thanks
Gareth.
-
- Gareth Davies
- March 31, 2005
- Like
- 0
- Continue reading or reply
TYPE attribute for TASK object. Does not display
Hi,
Currently customising the TASK object. We can add new values for TYPE but these are not then available through the presentation. This works fine for EVENT objects. Any ideas why and how to fix?
Thanks
Gareth
-
- Gareth Davies
- March 31, 2005
- Like
- 0
- Continue reading or reply
Task field "Type" can be updated - Why?
Hi -
I am Customising the Task object. We can add different values to the TYPE attribute. But this cannot be displayed.
Any ideas?
Thanks
Gareth
PS - this works fine for "Event" objects.
-
- Gareth Davies
- March 31, 2005
- Like
- 0
- Continue reading or reply
c# API 5.0: Problem Updating Custom (calculated) Field in Opportunity. (Urgent)
Hi,
I am currenlty participating in a proof of concept with a potential Enterprise Client.
Problem: Want to Create custom fields in an Opportunity that are calculated from other fields.
Proposed Solution: Write a web service sitting at client site, triggered from a web-link which passes Opportunity ID.
Q1: How do I pass the OpporunityID as a parameter, from a web-link on the Opportunity Page?
Q2: I have written a c# test client. (currently searches for Opportunity by Name, to get hold of the object).
This works, allows me to gain access to the opportunity. I can query the values of two of the custom fields and from that calculate the other two.
When I set the value of the other two and update (using the API update method). The custom fields do not update.
As a test I tried to update the NextStep attribute of the same object before calling update. This worked fine for the next step update, but still nothing on the custom fields.
I beleive that the downloaded WSDL file generates the proxy classes in VS OK as
a: the VS.NET intellisense contains the custom fields and
b: I can retreive custom values fine.
Any Suggestions much appreciated
Thanks, Gareth.
---------------------------------
Code:
-- This is the Update Routine.
-----------.
......
public static ArrayList oppList = new ArrayList();
.........
oppList = connection.queryOpportunity (txtOppName.Text,howMany);
....
--------
private void btnUpdateOp_Click(object sender, System.EventArgs e)
{
Opportunity opp;
btnUpdateOp.Enabled=false;
opp=(Opportunity) oppList[0];
opp.PFM__c= System.Convert.ToDouble(txtPFM.Text);
opp.Commission__c =System.Convert.ToDouble(txtCom.Text);
opp.NextStep=txtNextStep.Text;
connection.updateOpportunity(opp);
btnUpdateOp.Enabled=true;
}
----------------------
public bool updateOpportunity(Opportunity pOp)
{
....
SaveResult[] saveResults = binding.update(new WebReference.sObject[] { pOp});
...
}
(Note SaveResult[0].Success == True)
-
- Gareth Davies
- March 29, 2005
- Like
- 0
- Continue reading or reply
Example Python Interface to Logon to Salesforce.com
I spent an interesting day trying to find out why I could not use the wsdl file with SOAPpy (or with ZSI) then tried to
use SOAPpy calling using home-grown class definitions, but could not get that to work either - because SF.com
rejected the nesting of tags thrown up by SOAPpy - which I could not figure out how to turn-off.
In the end I wrote the following example code for doing it all by hand. If you are really stuck and need to develop in Python this may help you out:
Note I am not offering to support it, if someone would like to make it "safer", "tidier" and extend the data types
please post it back.
Best of Luck
Gareth
PS if you got SOAPpy or ZSI to work let me know how, as that would be neater.
########################################################
# Upside Outcomes Ltd, July 22nd 2004
#
# Example Python WebServices Code for Salesforce.com
#
# I tried using SOAPpy and ZSI but could not
#
# a> get the SF.com WSDL file to load
# b> get SF.com to take use the code generated by SOAPpy
# which put tags around the data objects, which through up complaints.
#
# This code allows you to create a login session. To go further you will need
# create objects for request and response messages for different operations
# Use this as a template and you should go OK.
#
# Copyright (c) Upside Outcomes Ltd www.upside-outcomes.com 2004
# You are free to use, copy, modify and distribute this code without charge provided that
# you do not
# 1. claim it to be your own or
# 2. claim that you own the copyright or
# 3. prevent others from doing the same
#
# And provided you include the following message:
#
# "Some of this code contains elements written by Upside Outcomes ltd. www.upside-outcomes.com "
#
#########################################################
import sys, httplib
from xml.sax import saxutils
from xml.sax import make_parser
from xml.sax.handler import feature_namespaces
from xml.sax import ContentHandler
SFNS='"urn:enterprise.soap.sforce.com"'
SFSERVER="https://www.salesforce.com/services/Soap/c/4.0"
USER="YOURNAME"
PASS="YOURPASSWORD"
def NormaliseWhiteSpace(text):
"Remove redundant whitespace from a string"
return ' '.join(text.split())
############################# Message Receiver #######
class LoginResponse (ContentHandler):
def __init__ (self):
#Initialise State Flags
self.inEnvelope=0
self.inBody=0
self.inLoginResponse=0
self.inResult=0
self.inServerUrl=0
self.inSessionId=0
self.inUserId=0
######### Data Space"
self.namespace=""
self.serverUrl=""
self.sessionId=""
self.userId=""
def startElement (self, name, attr):
if name == 'soapenv:Envelope': self.inEnvelope=1
if name == 'soapenv:Body': self.inBody=1
if name == 'logingResponse': self.inLoginResponse=1
if name == 'result': self.inResult=1
if name == 'serverUrl': self.inServerUrl=1
if name == 'sessionId': self.inSessionId=1
if name == 'userId': self.inUserId=1
def characters (self,ch):
if self.inServerUrl: self.serverUrl +=ch
if self.inSessionId: self.sessionId +=ch
if self.inUserId: self.userId += ch
def endElement (self, name ):
if name == 'soapenv:Envelope': self.inEnvelope=0
if name == 'soapenv:Body': self.inBody=0
if name == 'logingResponse': self.inLoginResponse=0
if name == 'result': self.inResult=0
if name == 'serverUrl': self.inServerUrl=0
if name == 'sessionId': self.inSessionId=0
if name == 'userId': self.inUserId=0
################### Message sender ####################
class Request:
def __init__ (self):
self.namespace=SFNS
self.objectType="null"
self.dataTypes=[]
self.data={}
def StartWS (self):
return '''
'''
def StopWS (self):
return """
"""
def SOAPMessage (self):
outstr=self.StartWS() + "\n"
outstr+="\n"
for element in self.dataTypes:
outstr+=""+self.data[element]+"\n"
outstr += ""
outstr += self.StopWS()
return (outstr)
class LogonRequest (Request):
def __init__ (self,u="",p=""):
Request.__init__(self)
self.ObjectType="login"
self.dataTypes=["username","password"]
self.data["username"]=u
self.data["password"]=p
####################
def Logon():
########### a=LogonRequest(USER,PASS)
Soapmessage = a.SOAPMessage()
blen = len(Soapmessage)
requestor = httplib.HTTP("www.salesforce.com", 80)
requestor.putrequest("POST", SFSERVER)
requestor.putheader("Host", "www.salesforce.com")
requestor.putheader('Content-Type", "text/plain; charset=utf-8')
requestor.putheader("Content-Length", str(blen))
requestor.putheader("SOAPAction", "")
requestor.endheaders()
requestor.send(Soapmessage)
#############
(status_code, message, reply_headers) = requestor.getreply()
reply_body = requestor.getfile().read()
print "status code:", status_code
print "status message:", message
############
# Set up the XML parser
p=make_parser()
message=LoginResponse()
p.setFeature(feature_namespaces, 0)
p.setContentHandler(message)
p.feed(reply_body)
print "SessionID: " + str(message.sessionId)
print "ServerURL: " + str(message.serverUrl)
print "UserId: " + str(message.userId)
if __name__ == "__main__":
Logon()
-
- Gareth Davies
- July 23, 2004
- Like
- 0
- Continue reading or reply
report API?
Is it possible to either run a report or retrieve a report meta data through the API? If so where would the definition of the reports syntax be defined?
I would like to drive code based on how my users have set filter criteria on certain reports.
- jawtech
- January 31, 2009
- Like
- 0
- Continue reading or reply
Really need some HELP around here
Campaign campaign = new Campaign();
campaign.Id = "701500000009731";
campaign.Name = "BreakFast Event";
campaign.surverys__r <------ [HOW CAN I CREATE the custom object here and add values]
Here is my DSD.
- ZitizonX
- September 03, 2007
- Like
- 0
- Continue reading or reply
S-Control to run a DOS executable
I have written a program in .NET that logins in to Sales Force and extracts data and reformats it in an excel file. It works fine when run from the command line or within windows, but I want to run it within SalesForce. Most probably create some type of s-control. The main reason I would like to run it within SalesForce is because the user will already be authenticated, so it makes it easier for them to just click a button/link.
Is there any samples/codes that I can be pointed to or any suggestions?
- smills
- July 09, 2007
- Like
- 0
- Continue reading or reply
SFDC integration with informatica
- gopipatel_2610
- June 29, 2007
- Like
- 0
- Continue reading or reply
Get Report Results with SOQL?
I have been provided with a Salesforce account with a simple list of customers in it, and a report I'd like to get the contents of (built by someone else)
I now have Perl Salesforce::Simple working, connecting to the account, and listing some fundemental objects. ( I don't know what they mean yet!) I'd like to execute this report and recieve the result back.
The way Salesforce::Simple works is that it just wraps a SOQL query. Some type information is there, but I dont have to deal with it if I don't have to... Far, far simpler than the whole SOAP/WSDL model.
shortest route from A to B?
thanks in advance
-Brian
- darkblue_b
- June 25, 2007
- Like
- 0
- Continue reading or reply
Bug in update?
I am trying to update a record of a custom object type.
The "Name" of the custom object type is set to be an auto-generated ID.
Sequence:
Retrieve() the required columns of obejct using ID.
This includes the Name field.
Update() a field (in this case "collected amount").
The update() call callbacks to my onSuccess handling function (i.e. no error reported) but the update fails.
If I remove the Name field from the object (by creating a new one and setting ID) then there is no issue everything works as expected.
I am not affected by this error now, but I think the API / AJAX code is not throwing on the attempt to update the auto generated NAME field which makes the update call fail.
- Gareth Davies
- May 29, 2007
- Like
- 0
- Continue reading or reply
Using Salesforce API/AJAX in external website
- Bhaskar-Prithvi
- May 09, 2007
- Like
- 0
- Continue reading or reply
Apex Eclipse Toolkit (8.0.2002) requires plug-in "org.apache.axis" on Vista Home Premium
I've been following the guidelines from:
9. In the following dialog, select the Apex Toolkit and then click “Select Required”
Apex Eclipse Toolkit (8.0.2002) requires plug-in "org.apache.axis"
I am running Eclipse Version 3.2.2
- GrantM
- May 09, 2007
- Like
- 0
- Continue reading or reply
Data Transition
- frankcse
- May 09, 2007
- Like
- 0
- Continue reading or reply
S-control to update survey cases
2. Set the contact of each survey case to the contact of the original case.
- Tudela
- April 23, 2007
- Like
- 0
- Continue reading or reply
Brain problem - how do I expose an APEX verb via the API?
I am taking baby steps with APEX - having now created and run triggers I have progressed to creating a package and want to expose it via the API.
This is the package which saves without Error from Eclipse.
Code:
package GWDWebServiceTest{ webService Id GWDTest(String lastName, Account a) { Contact c = new Contact (LastName = lastName, AccountId = a.Id); insert c; commit; return c.id; } }I expected that when I generated the WSDL (Enterprise or Partner, I've tried both) I would see a method called GWDTest (or perhaps GWDWebServiceTest.GWDTest) but I don't. I have checked that I don't have two packages with the same name and I don't (So it's not a name space issue).
I even tried to access it using this piece of AJAX
Code:
<script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/8.0/connection.js"></script> <script src="/soap/ajax/8.0/apex.js"></script> <script language="javascript"> sforce.debug.trace = true; function makeaContact() { alert ("Hi"); try { var account = sforce.SObject("Account"); var id = sforce.apex.execute ("GWDWebServiceTest","GWDTest",{a:"Smith",b:account}); alert (id); } catch (ex) { alert ("Failed : " + ex.message); } } </script>
But I only get the alert that says "Failed: undefined".
Any pointers?
Cheers
Gareth.
- Gareth Davies
- February 19, 2007
- Like
- 0
- Continue reading or reply
ASP.Net 2.0 Session management suggestions?
I'm building an application in .NET 2.0 and storing values into Session objects ("In Process") so I can access the objects on other pages in my application. The size and number of objects I'm storing as session objects has grown and now the application is experiencing performance problems (and it frequently loses the session objects).
Does anyone have experience using .NET 2.0 session objects? Would you recommend using "In Process" session objects (versus "SQL Server" mode)? Any recommendations or preferences about better ways to maintain state in a .NET application instead of using session objects?
Michael
- ColoradoMike
- February 13, 2007
- Like
- 0
- Continue reading or reply
Possbile to get this info into sales force more efficiently?
Somebody at the company then manually enters that info from these e-mails into salesforce.
I presume there must be a way to automate this process and take the laborious task off the shoulders of the employee at our company.
What options are available for allowing the info submitted by customers via a webform to automatically find its way into salesforce without manual receipt of the e-mail and subsequent data entry into saleforce by an employee?
- jmacd
- January 25, 2007
- Like
- 0
- Continue reading or reply
Communicating with the regular SF interface from within an external application
- Rutger Kars
- January 16, 2007
- Like
- 0
- Continue reading or reply
more reliable location for sforceclient.js?
Yesterday the main www.salesforce.com site was down periodically. Because of this, our S-Controls were encountering javascript errors ...presumably because the javascript source file is linked as follows: https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js
Are there alternate locations for this file that can be used to avoid this scenario? I've tried the na2 server but the file does not appear to be there.
Any help would be appreciated,
John
- Maplesoft BIS
- January 12, 2007
- Like
- 0
- Continue reading or reply
Intellisync Security
- Charlie G.
- January 11, 2007
- Like
- 0
- Continue reading or reply
Very basic ASP.net samples question
https://wiki.apexdevnet.com/index.php/API#.NET
and ran the installer. When I open the solution file with visual stdio.net, I get:
"The project file or web cannot be found"
under the ASPSample2 project.
Help?
- debbym
- January 10, 2007
- Like
- 0
- Continue reading or reply
Database Type?
- msimonds
- November 28, 2006
- Like
- 0
- Continue reading or reply
Accessing Salesforce Reports via API
We are working on a project and I was trying to find a reference regarding accessing reports via the API. You would think since the Office edition provides just this functionality the support should be there but I have not been able to find any documentation. Does anyone know if this is possible?
Thanks
Ok sorry.. found this post..
http://community.salesforce.com/sforce/board/message?board.id=NET_development&message.id=2198&query.id=40799#M2198
There was talk of support this in the future. Does anyone know if this made it to the Winter 07 release?
Message Edited by tango on 11-06-2006 07:25 PM
Message Edited by tango on 11-06-2006 07:26 PM
- tango
- November 07, 2006
- Like
- 0
- Continue reading or reply