-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
28Questions
-
70Replies
Tracking data changes
- ckemp
- April 23, 2009
- Like
- 0
- Continue reading or reply
Salesforce object ordering from API
I'm making an app that pulls Salesforce objects from the API and saves them in my local DB. Certain S-objects refer to other S-objects of the same type (e.g. Account has a parent Account field) and when I do the data pull, the API appears to send them to me in safe order where if S-object B refers to S-object A (e.g. B's parent Account is A) then the API sends A first, then B after.
I can't seem to find a case where this does not work, but I want to be completely sure that I can safely make the assumption that these will always be set in a safe order. Can any API experts confirm/deny this assumption please?
- ckemp
- March 15, 2009
- Like
- 0
- Continue reading or reply
Java API using old API version
I have set up the Java Partner API on our platform (Java/Spring/Hibernate) and am able to log in and do queries. However, when I use this, it appears to be using an old version of the API. For instance, I cannot access Event.StartDateTime or Event.StartEndTime which have been available at least since version 12.0, nor can I access Event.Type.
How do I access these fields? Is it possible to use the new Partner API somehow or do I have to manually do Web Services through something else other than the given com.sforce.soap.partner packages? (e.g. create my own XFire code)
- ckemp
- February 11, 2009
- Like
- 0
- Continue reading or reply
SOQL Joins via API
In our Java code, I'm doing something like this with the Partner API:
queryResult = binding.query("SELECT User.Id, UserName, FirstName, LastName, Email, Alias, IsActive, CompanyName, " + "Street, City, State, Country, PostalCode, Phone, LanguageLocaleKey, Profile.Name FROM User");
records = this.loadQueryResults(queryResult);
for (HashMap<String, String> record: records) { log.debug("Salesforce ID: " + record.get("id").toString()); log.debug("Username: " + record.get("username").toString()); log.debug("First Name: " + record.get("firstname").toString()); log.debug("Last Name: " + record.get("lastname").toString()); log.debug("Email: " + record.get("email").toString()); log.debug("Alias: " + record.get("alias").toString()); log.debug("Is Active?: " + record.get("isactive").toString()); log.debug("Company Name: " + record.get("companyname").toString()); log.debug("Street: " + record.get("street").toString()); log.debug("City: " + record.get("city").toString()); log.debug("Province: " + record.get("state").toString()); log.debug("Country: " + record.get("country").toString()); log.debug("Postal Code: " + record.get("postalcode").toString()); log.debug("Phone: " + record.get("phone").toString()); log.debug("LanguageLocaleKey: " + record.get("languagelocalekey").toString()); log.debug("Profile: " + record.get("name").toString()); }
And here is loadQueryResults():
private ArrayList<HashMap<String, String>> loadQueryResults(QueryResult qr) { ArrayList<HashMap<String, String>> returnVal = new ArrayList<HashMap<String, String>>(); if (qr.getSize() > 0) { boolean keepLooping = true; while (keepLooping) { for (int i = 0; i < qr.getRecords().length; i++) { MessageElement[] records = qr.getRecords(i).get_any(); HashMap<String, String> fields = new HashMap<String, String>(); if (qr.getRecords(i).getId() != null) { fields.put("id", qr.getRecords(i).getId()); } for (int j = 0; j < records.length; j++) { MessageElement record = records[j]; if (!fields.containsKey(record.getName())) { fields.put(record.getName().toLowerCase(), record.getValue()); if (record.getValue() == null) { System.out.println(record.getName().toLowerCase() + " ==> [null]"); } else { System.out.println(record.getName().toLowerCase() + " ==> " + record.getValue().toString()); } } } returnVal.add(fields); } if (qr.isDone()) { keepLooping = false; } else { try { qr = binding.queryMore(qr.getQueryLocator()); } catch (InvalidQueryLocatorFault e) { log.error("Failed to query, error message was: \n" + e.getExceptionMessage()); } catch (ApiFault af) { log.error("Failed to query, error message was: \n" + af.getExceptionMessage()); } catch (RemoteException e) { e.printStackTrace(); } } } } return returnVal; }
I can get the User.Id value, but cannot get Profile.Name (it prints out "profile ==> [null]" for that value.) Does anyone know how I can get this without having to do another query? When I do the same query in SoqlXplorer, it returns me the Profile.name value just fine so I know it is possible.
- ckemp
- February 06, 2009
- Like
- 0
- Continue reading or reply
Check boxes in Web2Lead
I have a form which was formerly implemented as a drop-down selector, like this:
<select id="00N70000009jrvK" multiple="multiple" name="00N70000001jrvK"> <option value="Option 1">Option 1</option> <option value="Option 2">Option 2</option> </select>
<input type="checkbox" value="Option 1" name="00N70000009jrvK">Option 1<br> <input type="checkbox" value="Option 2" name="00N70000009jrvK">Option 2<br>
Will this work with Web2Lead? Or should I be doing this another way since the "name" attribute should be unique? I tried to find some documentation for Web2Lead to figure this out, but they only seemed to have examples of simple forms with drop-downs. I was hoping someone who is familiar with this could steer me in the right direction. Thanks!
Message Edited by ckemp on 11-21-2008 10:20 AM
- ckemp
- November 21, 2008
- Like
- 0
- Continue reading or reply
Testing for a System Administrator with JavaScript
if (typeof(sforce) != "undefined") {
result = sforce.apex.execute("MyNamespace/MyWebService", "action", {ids : idsToSend}); } else { alert("You do not have sufficient privileges to do this."); }
This works just fine when I'm running it in my Developer's sandbox as a System Administrator and gives me the alert message when I am not a sysadmin. However, when I install this in production it gives me the "You do not have sufficient privileges to do this" message no matter what type of user I'm logged in with, including System Administrators. Does anyone know what's going on? Is there a different/better way to test whether the user is a sysadmin or not with JavaScript?
- ckemp
- October 14, 2008
- Like
- 0
- Continue reading or reply
Can't see custom object tab as non-administrator in package
When I check the profile for this user (a custom profile), they have read access to the object, so they should (in theory) be able to see it. If I change their profile to include all access for that object (read, create, edit, delete), they still cannot see the tab. They also have field accessibility to the object's fields (read-only, required, or editable for all fields.)
I've really ran out of things to try and am hoping some brilliant Salesforce expert can help tell me what I need to do to make it appear for these users. :-)
- ckemp
- August 28, 2008
- Like
- 0
- Continue reading or reply
Problems uninstalling Managed Beta Package in Sandbox
Custom S-Control MySControl1 The object "MySControl1" is in use by the object "Delete" and cannot be deleted.
Custom S-Control MySControl2 The object "MySControl2" is in use by the object "Delete" and cannot be deleted.
Custom S-Control MySControl3 The object "MySControl3" is in use by the object "New" and cannot be deleted.
These S-controls are used as Standard Button overrides (e.g. for the "New" and "Delete" buttons) and Standard Button overrides can't even be packaged! So I'm not sure where this dependency is coming from. Resetting the Custom Button overrides doesn't help either. Has anyone else come across this problem?
- ckemp
- July 29, 2008
- Like
- 0
- Continue reading or reply
Controlling API acccess for a package
How do I change these settings for my package? I don't need to access all of the objects, only Opportunities and Leads.
- ckemp
- July 25, 2008
- Like
- 0
- Continue reading or reply
Missing Organization Features
Missing Organization Feature: Product2.RecordType
Missing Organization Feature: Opportunity.RecordType
Missing Organization Feature: Lead.RecordType
Missing Organization Feature: OpportunitySalesTeam
The first one I understand. Our organization doesn't have Products, so this feature is obviously not turned on. Does anyone have any idea what the other three mean? We do have salespeople who enter opportunities and leads into Salesforce.
Message Edited by ckemp on 07-23-2008 10:20 AM
- ckemp
- July 23, 2008
- Like
- 0
- Continue reading or reply
Salesforce Client SSL certificate is expired
I am trying to get two-way SSL authentication working between Salesforce and my Tomcat server so I can send encrypted web service calls from Salesforce. One way works just fine. However, when I try using the Client Certificate that I downloaded from Setup > App Setup > Develop > API, it gets rejected with a "bad_certificate" IO Exception because Salesforce's certificate expired in 2004 (!!). I'm not the only one having this problem (see http://community.salesforce.com/sforce/board/message?board.id=general_development&view=by_date_ascending&message.id=19703) Does anyone know where the new certificate is?
- ckemp
- July 22, 2008
- Like
- 0
- Continue reading or reply
Triggers and "Too many SOQL queries" errors
Is there any way around this silly limit?
- ckemp
- June 25, 2008
- Like
- 0
- Continue reading or reply
Need to find all direct reports for a user
Any experts have idea how I can get at this value with SOQL?
- ckemp
- June 25, 2008
- Like
- 0
- Continue reading or reply
Collecting aggregate, anonymous usage data
- ckemp
- June 06, 2008
- Like
- 0
- Continue reading or reply
Searching within attachments
Does anyone know if it's possible to search within attachments? For instance, I want to be able to search within Word documents or Excel spreadsheets that are attachments in a repository. It looks like NetDocuments is doing something like this. Ditto for Appiro. Any idea how I can add this capability to my cusom apps?
- ckemp
- June 05, 2008
- Like
- 0
- Continue reading or reply
Abstract classes in AppExchange apps
On p. 71 of the Apex Developer's Guide, it says that "abstract and virtual [class modifiers] are not enabled for all organizations. If you need them for your application, contact your salesforce.com rep." I'm making an AppExchange app that will be using an abstract class, but now I'm worried that my app won't work "out of the box" for other organizations because they'll need to turn this feature on first.
Does anyone have any experience with this? Is this a big problem? It seems sort of silly to not have the ability to use abstract class modifiers on by default as it only encourages bad OO design and I can't fathom why disabling these modifiers would be of any advantage to Salesforce.
- ckemp
- June 03, 2008
- Like
- 0
- Continue reading or reply
Abstract classes in AppExchange apps
On p. 71 of the Apex Developer's Guide, it says that "abstract and virtual [class modifiers] are not enabled for all organizations. If you need them for your application, contact your salesforce.com rep." I'm making an AppExchange app that will be using an abstract class, but now I'm worried that my app won't work "out of the box" for other organizations because they'll need to turn this feature on first.
Does anyone have any experience with this? Is this a big problem? It seems sort of silly to not have the ability to use abstract class modifiers on by default as it only encourages bad OO design and I can't fathom why disabling these modifiers would be of any advantage to Salesforce.
- ckemp
- June 02, 2008
- Like
- 0
- Continue reading or reply
Custom button for "go to list" link
I have an object (let's call it MainObj) which has a related object (let's call that RelatedObj). I have a tab for MainObj which contains a related list for RelatedObj with a custom button and checkboxes which I got there by going to "Edit Page Layout" for MainObj and editing RelatedObj in the "Related List Section". However, I would like to do the same thing (custom button with checkboxes) for the page that you go to when you click the "Go to list" link in the RelatedObj list view in MainObj's tab, where it shows all RelateObj objects related to that MainObj object.
Does anyone have any idea of how I can do this? I've tried everything (pulling out my hair hasn't helped either) and I'm not sure it's even possible unless some super-genius has an idea. Thanks!
- ckemp
- May 29, 2008
- Like
- 0
- Continue reading or reply
General packaging and distribution questions
I'm a newbie who has a few questions about the packaging and distribution of Sf apps:
- Can I package an app that I've made with a developer account and deploy it to only my organization instead of putting it on AppExchange? (seems like you should be able to but I just want to confirm 100% that this is possible...)
- If I release my app on AppExchange, will others be able to see the code I've produced once they install it?
- If I want to get my app certified for release on AppExchange, do I have to make external web service calls over SSL or can I do this in plaintext? (it's not critical data like account or lead info, only custom object data)
- ckemp
- May 27, 2008
- Like
- 0
- Continue reading or reply
Web service multiple namespace issue
I have a very tricky problem with a web service call I'm doing to an external server. When I generate the WSDL and do a callout, I get this SOAP request that I trap in the System Log with the debug level set to "Callout":
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Header /> <env:Body> <doUserPointTransactions xmlns="http://webservice.razorpoints.ilr.com"> <adminUsername>my.name@domain.com</adminUsername> <adminPassword>mypassword</adminPassword> <wsPointUploads> <WsPointUpload> <amount>111</amount> <description>aaaaaaaaaaaaa</description> <programAccountPK>1</programAccountPK> <userPK>bbb</userPK> </WsPointUpload> </wsPointUploads> </doUserPointTransactions> </env:Body> </env:Envelope>
However, this returns a SoapFault because the receiving side says that WsPointUpload is empty, which it clearly is not. When I generate the same web service call in Eclipse with the same WSDL, I get this:
<soapenv:Envelope xmlns:q0="http://webservice.razorpoints.ilr.com" xmlns:q1="http://webservice.model.razorpoints.ilr.com" 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:Header></soapenv:Header> <soapenv:Body> <q0:doUserPointTransactions> <q0:adminUsername>my.name@domain.com</q0:adminUsername> <q0:adminPassword>mypassword</q0:adminPassword> <q0:wsPointUploads> <q1:WsPointUpload> <q1:amount>111</q1:amount> <q1:description>aaaaaaaaaaaaa</q1:description> <q1:programAccountPK>1</q1:programAccountPK> <q1:userPK>bbb</q1:userPK> </q1:WsPointUpload> </q0:wsPointUploads> </q0:doUserPointTransactions> </soapenv:Body> </soapenv:Envelope>
Note that in this request, there are two namespaces, http://webservice.razorpoints.ilr.com and http://webservice.model.razorpoints.ilr.com. In the first WS call (the one generated by Salesforce) there is only one namespace, http://webservice.razorpoints.ilr.com, and the WsPointUpload element is not part of this namespace.
If I make a SOAP request in Eclipse using the Salesforce request (the first one above) and manually add 'xmlns="http://webservice.model.razorpoints.ilr.com"' to the <WsPointUpload> element, the web service call works. Is there any way I can force this second namespace to appear in Salesforce or is this just a Saleforce bug?
Message Edited by ckemp on 05-16-2008 10:14 AM
- ckemp
- May 16, 2008
- Like
- 0
- Continue reading or reply
Tracking data changes
- ckemp
- April 23, 2009
- Like
- 0
- Continue reading or reply
Where can i get SFDC Java API ?
Hi,
I have a requirement of writing a Java class that connects Salesforce and access a Salesforce Custom object and insert records into it.
Can this be done?
If yes, where can i get SFDC Java API for writing this.
Thanks,
OnDem
- OnDem Dev
- March 15, 2009
- Like
- 0
- Continue reading or reply
Java API using old API version
I have set up the Java Partner API on our platform (Java/Spring/Hibernate) and am able to log in and do queries. However, when I use this, it appears to be using an old version of the API. For instance, I cannot access Event.StartDateTime or Event.StartEndTime which have been available at least since version 12.0, nor can I access Event.Type.
How do I access these fields? Is it possible to use the new Partner API somehow or do I have to manually do Web Services through something else other than the given com.sforce.soap.partner packages? (e.g. create my own XFire code)
- ckemp
- February 11, 2009
- Like
- 0
- Continue reading or reply
Check boxes in Web2Lead
I have a form which was formerly implemented as a drop-down selector, like this:
<select id="00N70000009jrvK" multiple="multiple" name="00N70000001jrvK"> <option value="Option 1">Option 1</option> <option value="Option 2">Option 2</option> </select>
<input type="checkbox" value="Option 1" name="00N70000009jrvK">Option 1<br> <input type="checkbox" value="Option 2" name="00N70000009jrvK">Option 2<br>
Will this work with Web2Lead? Or should I be doing this another way since the "name" attribute should be unique? I tried to find some documentation for Web2Lead to figure this out, but they only seemed to have examples of simple forms with drop-downs. I was hoping someone who is familiar with this could steer me in the right direction. Thanks!
Message Edited by ckemp on 11-21-2008 10:20 AM
- ckemp
- November 21, 2008
- Like
- 0
- Continue reading or reply
Can't see custom object tab as non-administrator in package
When I check the profile for this user (a custom profile), they have read access to the object, so they should (in theory) be able to see it. If I change their profile to include all access for that object (read, create, edit, delete), they still cannot see the tab. They also have field accessibility to the object's fields (read-only, required, or editable for all fields.)
I've really ran out of things to try and am hoping some brilliant Salesforce expert can help tell me what I need to do to make it appear for these users. :-)
- ckemp
- August 28, 2008
- Like
- 0
- Continue reading or reply
Problems uninstalling Managed Beta Package in Sandbox
Custom S-Control MySControl1 The object "MySControl1" is in use by the object "Delete" and cannot be deleted.
Custom S-Control MySControl2 The object "MySControl2" is in use by the object "Delete" and cannot be deleted.
Custom S-Control MySControl3 The object "MySControl3" is in use by the object "New" and cannot be deleted.
These S-controls are used as Standard Button overrides (e.g. for the "New" and "Delete" buttons) and Standard Button overrides can't even be packaged! So I'm not sure where this dependency is coming from. Resetting the Custom Button overrides doesn't help either. Has anyone else come across this problem?
- ckemp
- July 29, 2008
- Like
- 0
- Continue reading or reply
Anyone seeing problems with uninstallation of apps getting stuck in the "pending" state?
- TLF
- July 25, 2008
- Like
- 0
- Continue reading or reply
Salesforce Client SSL certificate is expired
I am trying to get two-way SSL authentication working between Salesforce and my Tomcat server so I can send encrypted web service calls from Salesforce. One way works just fine. However, when I try using the Client Certificate that I downloaded from Setup > App Setup > Develop > API, it gets rejected with a "bad_certificate" IO Exception because Salesforce's certificate expired in 2004 (!!). I'm not the only one having this problem (see http://community.salesforce.com/sforce/board/message?board.id=general_development&view=by_date_ascending&message.id=19703) Does anyone know where the new certificate is?
- ckemp
- July 22, 2008
- Like
- 0
- Continue reading or reply
- JerryJoseph
- May 06, 2008
- Like
- 0
- Continue reading or reply
Create a New Opportunity Record based on Stage = "Closed/Won"
I have a hard time programming from scratch, especially on code that I have never written before. Does anyone have examples of something like this? Thanks
Message Edited by jk51141 on 05-06-2008 06:37 AM
- jk51141
- May 05, 2008
- Like
- 0
- Continue reading or reply