Activity Forums Salesforce® Discussions How to identify cases in Salesforce which are written other than English?

  • Prakhar

    Member
    August 26, 2016 at 8:46 am

    Hi Vasundhara,

    Confirming that you have following settings in your organization according to the link below:-
    https://help.salesforce.com/apex/HTViewSolution?id=000005218&language=en_US

    Then according to my understanding you want to get all the cases which are being saved in different languages. Since the record which is being saved in Salesforce is being inserted in the language defined for the users. For Example:

    If the user XYZ language is being set as "Spanish", then the case record being saved by the user would save according to the Spanish language of user.

    So to get the case records with different language what I would suggest first query the users which have the defined language. So your query would be something like this:

    String lang = 'es';

    Note :- "es" is the language code for Spanish language.

    List<User> userObj = [Select Id,Name from User where LanguageLocaleKey =: lang];

    Using the above query would give you all the users with defined language in the parameter "lang".

    Now to get the case records which are being inserted or saved in different language, use the below query:

    List<Case> lisOfCaseRecordInDifferentLanguage = [Select Id, Name from Case where OwnerId IN : userObj];

    Using the above solution would resolve your query.

    Hope that helps.

    Thanks,

    Prakhar.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos