• Mike Slivka
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello, I have recently been working with a new Brazilian employee that was having difficulty entereing a opportunity (language was set as Portugese). After doing some research it seems that the user was causing an error in a trigger we have on insert and update for Opportunities (see below)

List<string> AdminProfileNames = 'System Administrator'.split(',');
List<Profile>Admin_Profiles = [Select Id, Name from Profile where Profile.name in :AdminProfileNames];
system.debug('Admin_Profiles[0].id='+Admin_Profiles[0].id);

System.ListException: List index out of bounds: 0

After looking into the code I changed it to the code below and it worked fine for this user.

 List<string> AdminProfileNames = 'System Administrator,Administrador do sistema'.split(',');
List<Profile>Admin_Profiles = [Select Id, Name from Profile where Profile.name in :AdminProfileNames];
system.debug('Admin_Profiles[0].id='+Admin_Profiles[0].id);

This brings up a larger question for me. Through all of my years of programming I have been told that matching things on straight text is dangerous and to use IDs whenver possible. In Salesforce, however, this seems to be used in criteria for searches, rules, exceptions, etc.and is almost the preffered way of doign things. So as our company moves more into international markets I have been told that Translation Workbench is the way to go for multi-Lingual support. I don't know much about this product, but I wanted to see if this will solve all our problems in all the areas of concern (inside APEX triggers, criteria for rules, etc.) or if there are any large problems that still have not been solved with this option.  
I am currently usinghhte Enterprise WSDL pulled out of our organization. Is there an object that contains a listing of the Sandboxes we have setup? What I am looking to do is create a page that will allow the user to see all the sandboxes in a dropdown so that they can choose which sandbox to generate a WSDL for. The infomration in the back end would contain the sandbox name (for login purposes) and the server it resides on (c12, c16, etc.).

I understand that I will need some sort of way of storing a username/password/token for each sandbox so that I can log in and generate the WSDL, but really I am trying to figure out how to build that page right now. Thanks!

 
I am currently usinghhte Enterprise WSDL pulled out of our organization. Is there an object that contains a listing of the Sandboxes we have setup? What I am looking to do is create a page that will allow the user to see all the sandboxes in a dropdown so that they can choose which sandbox to generate a WSDL for. The infomration in the back end would contain the sandbox name (for login purposes) and the server it resides on (c12, c16, etc.).

I understand that I will need some sort of way of storing a username/password/token for each sandbox so that I can log in and generate the WSDL, but really I am trying to figure out how to build that page right now. Thanks!

 

Hello,

 

I'm trialling SaleForce for our company (specifically synching data via the API)... and in doing so am changing schema quite a bit.

 

At the moment, I'm having to manually log in and regenerate schema each time (and then have an automated process to convert this into C#)

 

I would like to automate the refresh of schema.... however, I cannot see how to authenicate programmatically to the page https://eu1.salesforce.com/soap/wsdl.jsp?type=*

 

I'm probably missing something obvious - can someone help?

 

Regards,

Mark.