• Gareth Davies
  • NEWBIE
  • 65 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 240
    Replies
I think I found a bug in the version 9 AJAX library.

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.

   
I know this is simple, so I must be doing something wrong. Please help.

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.

 

A lot of our web downloads, user registrations and license management is implemented from our Website direct through to Salesforce.com via the API. I know that we can report on logins. Is it possible to know how many API calls/hour or per day we are executing?
 
Hi all,
 
We recently released our version of report scraping classes in c#. Hosted at SalesforceWatch.com.
 
Please note that you are free to use the code however you wish (there's a license agreement and sample exe in the package), but it is not supported by us or by Salesforce.com. It relies on the HTML output from the reporting engine which is subject to change without notice.
 
Caveats aside it has proven useful to us and we hope that it is for you too.
 
Best Regards,
Gareth.
Hi,
 
I'd appreciate your comments on the following suggestion, is it a good idea to have in the platoform or not?
 
----
 
A number of our applications require to store some form of persistent settings/configuration data. We have either done this within custom objects, flat-files or system registry keys. What I propose is to have a new standard object in every Salesforce.com installation that we will know is there and can be used by developers for this purpose:
 
My Suggestion would be to have an object called "NamedValue" which has the following attributes associated with it (in addition to the standard system info like ID, modestamp etc).
 
1. Name
2. Namepsace 
3. StringValue (string)
4. NumberValue (number)
5. DateValue (DateTime)
 
---------
 
With such an object we could ship S-Controls, Win32 Apps, etc. all of which would know that they could store and retreive values from this storage area without having to package a seperate area for each new control written. (save namespace clashes in AppExchange downloads).
 
Any thoughts?
 
Cheers
Gareth.
"Permission denied to call method XMLHttpRequest.open"
 
I am testing with some cross browser apps.
 
I have an HTML page which I load locally which has the the following :
 
      Code:
var result = sforceClient.login(DebugUser,DebugPass); 

 
This works fine when I test with IE (6.0.2900.) but with FF (1.5.0.4) it throws the above exception.
 
I can't find the call that is throwing the error (the debugger is not really that good in FF) but I have had the same issue when trying to load XML documents which was caused by the following:
 
ThIS Works in IE but not in FF
 

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

Hi

 
I trapped the above error when doing a particularly large call to describeSObjects

 
DescribeObjectResult[] AllObjectsDescribed =
binding.describeSObjects(String[] of all ObjectNames)
 

 
- I admit  a rare case but not one I have found before


C# Partner API V 6.0 
I guess this has been thrown due to the resulting size of the SOAP message (?)
 

 
What is the Limit and how can I determine it at run-time. The alternative of querying each object individually is a bit slow and I want to avoid an arbitary batch size.

Any thoughts gratefully received.

Thanks

Gareth.

Message Edited by Gareth Davies on 03-03-2006 03:28 PM

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.

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.

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

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.

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)

 

Hello,

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()

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.

We are creating a simple survey pluggin to SF account. I have 3 custom objects as shown in the image below. And I have defined their relationships. If I have the Campaign ID in my development enviornment how can I create a Survey Custom Object programatically.
 
This is my code;

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.

 

Hi,
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?

Hi All,
 
Can anyone tell me where can I find the documents related to SFDC integration with Informatica.
 
Thanks,
Hello- I'm new to Salesforce, an experienced developer otherwise.
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

I think I found a bug in the version 9 AJAX library.

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.

   
Hi
I want to use Ajax in external site,because the whoe site(Product)  was devloped uing Ajaxpro.So we want ada Tickeing module to it.Using Salesforce we will create self-service users and enable them.
 
Now  want to give a custome screens that match with existing layout,
 
i.e we dont want separate login again fo Selef-Service user. Because i have existing credentails are set to SS User.
 
If this not works ,how i can use my custom page to validate SS user and create cases and views cases of that user?
 
Any example to work with AJAX with external site.
 
 
I am new to Salesforce.com Integration how i can use selfService AI call in my alication
Please Help Me.
 
 
Hi,
 
I am trying to install the Apex Toolkit for eclipse.
I've been following the guidelines from:
I keep getting stuck at step 9:
9. In the following dialog, select the Apex Toolkit and then click “Select Required”
Here i am presented with the following error:
Apex Eclipse Toolkit (8.0.2002) requires plug-in "org.apache.axis"
I am working on Windows Vista Home Premium.
I am running Eclipse Version 3.2.2
I have installed the latest version of Java "Windows Platform - Java(TM) SE Development Kit 6 Update 1" from http://java.sun.com/javase/downloads/index.jsp
Please Help Me...
 
This is the scenario.
For a particular User Account i have 100 Leads. Now i have another user account . I need to transfer all old Leads to new User Account.(I want this to be done in Dot Net)
 
Please help
 
Thanks in Advance
 
We have a case closed survey that creates a new case via web2case. The survey form updates a custom field called "surveyCaseNumber" with the case number of the case being surveyed.
 
When the survey is done, I would like to update the survey cases with information from the original cases. Specifically, I would like to accomplish the following:
 
1. Set the owner of each survey case to the owner of the original case.
2. Set the contact of each survey case to the contact of the original case.
 
I suspect an S-control may be the way to go, but I'm new to S-controls.
 
Can someone provide example code for how to do this?
 
Thanks!
  • April 23, 2007
  • Like
  • 0
I know this is simple, so I must be doing something wrong. Please help.

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.

 

Hi everyone --

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
My employer collects system monitoring info from our customers.  They enter it into a webform on our website, which in turn sends us an e-mail.

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?
  • January 25, 2007
  • Like
  • 0
Hi,
 
currently I'm developing an SalesForce integration with a call application. This application provides an integrated webbrowser in which I want to load the normal SalesForce interface/application.
When a call is coming in, I want to automatically search for the account/contact who is calling in SalesForce.
Initially, I have done some investigating on the SF API which I can use. I can search directly some SQL statements for the necessary information. However, in that case I do need to develop an interface myself. What I basically want is that I use the complete SalesForce interface within my application, and that when I search for a Contact for example, that I display that contact information in SF the same way as when I've done a search in SF manually.
In that way, the user can work in SF whole day, with the standard interface, only they have another skin and additional functionality in the parent application.
 
As this is my first SF development, any help is appreciated. Btw, I want to develop it in ASP.NET
 
TIA, Rutger

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

My organization seems to be resistant to granting us the ability to use the synch tool between outlook and Salesforce.
 
Does anyone know if there is any real secruity risk to our OUTLOOK Exchange Server that we need to know about? 
 
 
I downloaded the ASP samples from here:
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?

  • January 10, 2007
  • Like
  • 0
I did not know where to post this, sorry if this is the wrong place!
 
Does salesforce use Oracle as the database?
 
If so could someone please confirm this?
 
Thanks,
Mike
Maxim Int Products
   
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

  • November 07, 2006
  • Like
  • 0