• ckemp
  • NEWBIE
  • 10 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 70
    Replies
I need to be able to have an audit trail to track what data has changed for Salesforce objects (e.g. Opportunities, Leads, Accounts, etc.)  I thought there was some way to do this (a "track changes" sort of setting) but can't seem to find it.  Is there any way for a user to see a list of what changes were made when?
  • April 23, 2009
  • Like
  • 0

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?

  • March 15, 2009
  • Like
  • 0

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)

  • February 11, 2009
  • Like
  • 0

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.

 

  • February 06, 2009
  • Like
  • 0
Hi,

I have a form which was formerly implemented as a drop-down selector, like this:

Code:
<select id="00N70000009jrvK" multiple="multiple" name="00N70000001jrvK">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
</select>


Instead, I would like to use a series of check boxes, like this:

Code:
<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
  • November 21, 2008
  • Like
  • 0
I have a custom button that I have created that will call a web service.  I want the button to only work for System Administrators, so I added this JavaScript to the button with an OnClick event:

Code:
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?
  • October 14, 2008
  • Like
  • 0
I have a strange problem when installing a package that I've created.  I have a custom object tab added to my app for an object (let's call it MyCustomObject.)  After I install the app, I can see the tab when logged in as an administrator.  When I try and log in as a non-administrator, the tab is missing.  I can see other tabs in my app (web tabs) but not the tab for MyCustomObject.  I cannot add the tab either, as I normally would by clicking the arrow tab and trying and move it from "Available Tabs" to "Selected Tabs" (it's not in the "Available Tabs" list.)

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. :-)
  • August 28, 2008
  • Like
  • 0
I'm having problems uninstalling a Managed Beta package in my Sandbox.  When I try to do so, I get the errors:

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?
  • July 29, 2008
  • Like
  • 0
When I am installing a managed package, I get to this screen where I am shown the API access for the package:

How do I change these settings for my package?  I don't need to access all of the objects, only Opportunities and Leads.
  • July 25, 2008
  • Like
  • 0
I've packaged an app as a Managed Beta package and am trying to install it to my organization's Salesforce instance.  However, when I do this, I get the following message:

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
  • July 23, 2008
  • Like
  • 0
Hello,

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?
  • July 22, 2008
  • Like
  • 0
I have a handful of triggers that execute every time an Opportunity is saved.  However, when I save an Opportunity, I'm now getting a "System.Exception: Too many SOQL queries: 21" error.  When I check the debug log, it shows that no single trigger is running more than 20 SOQL statements (each are running about 3-4, but there are 6 or 7 triggers).  I thought that the 20 SOQL statement limit was per trigger (as indicated in the manual) and this totally makes sense.  It does not make sense that it would be a cumulative total over all triggers. 

Is there any way around this silly limit?
  • June 25, 2008
  • Like
  • 0
I need to get all of the users who report to a certain manager.  If I go to Setup > My Personal Information > Personal Information, I can view and select a manager for my user.  However, this is not captured as a field in the User object and there does not appear to be a way to access this via SOQL that I can see.  The query "SELECT ManagerId FROM User" from this thread does not work either (the ManagerId column does not exist.) 

Any experts have idea how I can get at this value with SOQL?
  • June 25, 2008
  • Like
  • 0
I'd like to know if it's possible for our application on AppExchange to occasionally (e.g. once a month) "phone home" and send our servers information about customer usage.  We'd like to know how often our custom app is being used so we might send aggregate info like how many rows a user has created in a certain table (not any of the info in the table itself.)  Does AppExchange allow this as long as it's anonymous, aggregate info on non-sensitive (i.e. custom) tables?
  • June 06, 2008
  • Like
  • 0
Hello,

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?
  • June 05, 2008
  • Like
  • 0
Hello,

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.
  • June 03, 2008
  • Like
  • 0
Hello,

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.
  • June 02, 2008
  • Like
  • 0
Hello,

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!
  • May 29, 2008
  • Like
  • 0
Hello,

I'm a newbie who has a few questions about the packaging and distribution of Sf apps:
  1. 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...)
  2. If I release my app on AppExchange, will others be able to see the code I've produced once they install it?
  3. 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)
Thanks in advance for your help!
  • May 27, 2008
  • Like
  • 0
Hello,

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":

Code:
<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:

Code:
<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
  • May 16, 2008
  • Like
  • 0
I need to be able to have an audit trail to track what data has changed for Salesforce objects (e.g. Opportunities, Leads, Accounts, etc.)  I thought there was some way to do this (a "track changes" sort of setting) but can't seem to find it.  Is there any way for a user to see a list of what changes were made when?
  • April 23, 2009
  • Like
  • 0

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

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)

  • February 11, 2009
  • Like
  • 0
Hi,

I have a form which was formerly implemented as a drop-down selector, like this:

Code:
<select id="00N70000009jrvK" multiple="multiple" name="00N70000001jrvK">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
</select>


Instead, I would like to use a series of check boxes, like this:

Code:
<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
  • November 21, 2008
  • Like
  • 0
I have a strange problem when installing a package that I've created.  I have a custom object tab added to my app for an object (let's call it MyCustomObject.)  After I install the app, I can see the tab when logged in as an administrator.  When I try and log in as a non-administrator, the tab is missing.  I can see other tabs in my app (web tabs) but not the tab for MyCustomObject.  I cannot add the tab either, as I normally would by clicking the arrow tab and trying and move it from "Available Tabs" to "Selected Tabs" (it's not in the "Available Tabs" list.)

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. :-)
  • August 28, 2008
  • Like
  • 0
I'm having problems uninstalling a Managed Beta package in my Sandbox.  When I try to do so, I get the errors:

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?
  • July 29, 2008
  • Like
  • 0
Today, I tried uninstalling a trial version of an app that I got off of AppExchange. The uninstallation appears to have gotten stuck in the "pending" state. I noticed this same behavior in two other Salesforce instances with a different app yesterday. In those cases, the uninstall has now been in the pending state for about 18 hours. Is it normal for an uninstall to take this long? Has anyone else seen this?
  • July 25, 2008
  • Like
  • 0
Hello,

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?
  • July 22, 2008
  • Like
  • 0
how do you send automated emails for the events we create??
    Hi everyone, I am fairly new to apex language.  I am trying to create a simple script that will create a new Opportunity (Renewal) if the Stage = "closed/won".  So, if an Opportunity Stage = "closed/won" create a new Opportunity, and duplicate any required fields and save the new record.  The trigger would also need to be dependent on Record Type because we have many other divisions using other Page Layouts or by Role. 

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