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.
    FindPersonalRedirectionFolderInformation findRequest = new findPersonalRedirectionFolderInformation();
    findRequest.userId = userID;
    FindPersonalRedirectionFolderInformationResponse findResponse = emailDominoWebService.findPersonalRedirectionFolderInformation(findRequest);
    FindPersonalRedirectionFolderInformationResult findResult = response.returnValue;
  2. Check the result for errors and handle any errors.
    if( findResult.findPersonalRedirectionFolderInformationReturnStatus.code != 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.personalRedirectionFolderInformation;
    redirectionInformation.redirectionType = PersonalRedirectionFolderInformationTypeEnumType.INBOX_AND_SENT_ITEMS_ONLY;
  4. Invoke setPersonalRedirectionFolderInformation() to change the folder settings.
    SetPersonalRedirectionFolderInformation setRedirectionResult = new setPersonalRedirectionFolderInformation();
    setRedirectionResult.userId = userID;
    SetPersonalRedirectionFolderInformationResponse findResponse = emailDominoWebService.setPersonalRedirectionFolderInformation(setRedirectionResult);
    SetPersonalRedirectionFolderInformationResult findResult = response.returnValue;
  5. Check the result for errors and handle any errors.
    if( redirectionResult.setPersonalRedirectionFolderInformationReturnStatus.code != SetPersonalRedirectionFolderInformationStatusEnumType.SUCCESS )
    {
        // handle any errors
    }
Next topic: Glossary

Was this information helpful? Send us your comments.