Change the folder settings for message forwarding for a BlackBerry device

To change the message folders that the BlackBerry® Enterprise Server redirects to a BlackBerry device, you can use the setPersonalRedirectionFolderInformation() method.
Before you begin: Retrieve the userID integer for the user account assigned to the BlackBerry device that you want to change the folder settings for.
  1. Invoke findPersonalRedirectionFolderInformation() to retrieve the folder settngs.
    FindPersonalRedirectionFolderInformationResult findResult = emailDominoWebService.findPersonalRedirectionFolderInformation( userID );
    
  2. Check the result for errors and handle any errors.
    if( findResult.getFindPersonalRedirectionFolderInformationReturnStatus().getCode() != FindPersonalRedirectionFolderInformationStatusEnumType.SUCCESS )
    {
        // handle any errors
    }
  3. Retrieve the folder settings and change the redirection type to INBOX_ONLY, INBOX_AND_SENT_ITEMS_ONLY, or SELECTED_FOLDERS.
    PersonalRedirectionFolderInformation redirectionInformation = findResult.getPersonalRedirectionFolderInformation();
    redirectionInformation.setRedirectionType(PersonalRedirectionFolderInformationTypeEnumType.INBOX_AND_SENT_ITEMS_ONLY );
  4. Invoke setPersonalRedirectionFolderInformation() to change the folder settings.
    SetPersonalRedirectionFolderInformationResult setRedirectionResult = emailDominoWebService.setPersonalRedirectionFolderInformation( userId, redirectionInformation );
  5. Check the result for errors and handle any errors.
    if( setRedirectionResult.getSetPersonalRedirectionFolderInformationReturnStatus().getCode()!= SetPersonalRedirectionFolderInformationStatusEnumType.SUCCESS )
    {
        // handle any errors
    }
Next topic: Glossary

Was this information helpful? Send us your comments.