• Vilo
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

Hi,

After downloading Java Samples [sforce 6.0] from https://www.sforce.com/us/downloads/EnterpriseSamples6_0.zip and I have been testing Samples.java

I run into a problem with running getUpdatedSample() for SelfServiceObject. The code fails on GetUpdatedResult mr = binding.getUpdated("SelfServiceUser", (Calendar)cal, (Calendar)calEnd);

I went further with debugging, and the call seems to fail in SoapBidingStub.java on line:
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {sObjectType, startDate, endDate});

All other objects work fine. Any idea what is going on?

Thank you,
Peter

Here is the source code:

private void getUpdatedSample() {
  //Verify that we are already authenticated, if not
  //call the login function to do so
  if (!loggedIn) {
    if (!login()) {
   return;
    }
  }

  try {
   //Calendar deletedDate
   GregorianCalendar cal = (GregorianCalendar) binding.getServerTimestamp().getTimestamp();
   GregorianCalendar calEnd = (GregorianCalendar)cal.clone();
   cal.add(GregorianCalendar.MINUTE, -5);   
   
   GetUpdatedResult mr = binding.getUpdated("SelfServiceUser", (Calendar)cal, (Calendar)calEnd);
   if (mr.getIds() != null && mr.getIds().length != 0) {
    for (int i=0;i<mr.getIds().length;i++) {
     System.out.println(mr.getIds(i).getValue() + " was updated.");
    } 
   } else {
    System.out.println("No updates to accounts in the last 5 minutes.");
   }
   //getUserInput("\nHit return to continue...");
  }
  catch (UnexpectedErrorFault uef) {
    System.out.println("ERROR\nERROR\nERROR\n" + uef.getExceptionMessage());
    getUserInput("\nHit return to continue...");
    loggedIn = false;
  }
  catch (Exception ex) {
    System.out.println(
     "\nFailed to execute query succesfully, error message was: \n"
     + ex.getMessage());
    getUserInput("\nHit return to continue...");
    loggedIn = false;
  }
  try {
   Thread.sleep(300);
  } catch (InterruptedException e) {
   
   e.printStackTrace();
  }
 }

We have purchased SFDC Enterprise Edition and we are looking for a way to have our clients (contacts in SFDC) submit/view cases directly into/from SFDC.

We were looking at self-service portal in SFDC, but this portal doesn't seem to work for our company for a following reason. Our accounts in SFDC have been configured as a hierarchy accounts (For example: Corporate Office->Continet Office->Regional Office->City Office->...) and there are contacts on each level. Our contacts need to be able to add/edit cases for their accounts as well as all child accounts (basicaly have the same hierarchy in portal). It seems like SFDC self-service portal cannot do that. Am I correct?

We are thinking about writing our own portal that would work directly with SFDC database. Is it possible? If yes, can you please give us an advice on how to do following?

- Single sign-on from our product (web based application) directly to SFDC (Contact level users)
- View issues based on SFDC hierarchy
- Uploading files to SFDC from our portal

Thank you