• 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();
  }
 }

  • July 24, 2005
  • Like
  • 0

I have developed a java code that allows Salesforce licensed user login to our external application using his Salesforce username and password and create a case via our internal web form (not using self serviced portal). When a user creates a case, it gets automatically assigned to him. I would like to change it and assigned the case to our case queue instead. I have the queue ID from group object, but I don't know how to use it with setOwnerId() method  Can you provide any example for doing this?

Thank you.

  • July 01, 2005
  • Like
  • 0

Sforce 6.0 API describes SelfServiceUser API as:

Quote:
SelfServiceUser API
The new release includes a new SelfServiceUser object that supports create, update, query, setPassword, and resetPassword calls. With this new object, you can enable single sign-on for your self-service users.

Is there any java example or detailed documentation about how to enable single sign on for the self service users?

Thank you,
Vilo

  • June 14, 2005
  • Like
  • 0

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

  • May 18, 2005
  • Like
  • 0

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

  • July 24, 2005
  • Like
  • 0

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

  • May 18, 2005
  • Like
  • 0