web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Finding the CRM language Id (LCID) from within a C# Custom Workflow Activity

(0) ShareShare
ReportReport
Posted on by 855

Hi all,

We have C# custom workflow activities (implementing the CodeActivity base class) in which we need to retrieve the originating user's language Id (LCID). I haven't been able to find it in the IWorkflowContext that you get from the execution context. 

Any idea on how I could retrieve this language Id from a custom C# workflow activity?

Many thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Finding the CRM language Id (LCID) from within a C# Custom Workflow Activity

    refer below link

    aspsolutionkirit.blogspot.in/.../how-to-change-user-language-in-dynamic.html

  • Suggested answer
    vinod shivoor Profile Picture
    1,225 on at
    RE: Finding the CRM language Id (LCID) from within a C# Custom Workflow Activity

    Hi Hope this helps.

    community.dynamics.com/.../181461

  • Suggested answer
    Royal King Profile Picture
    27,686 on at
    RE: Finding the CRM language Id (LCID) from within a C# Custom Workflow Activity

    You can retrieve user language using below Fetchxml Query , If user did not setup language  then organization base language becomes user language.Below fetchxml will retrrieve user language as well org language. If user language does not exists you can consider organization language as user language.Replace user Guid with current User Id

    <fetch count="1" >

     <entity name="usersettings" >

       <attribute name="localeid" alias="language" />  

       <filter type="and" >

         <condition attribute="systemuserid" operator="eq" value="4373eaeb-2ad0-4031-98af-2fa2308a6d8f" />

       </filter>

       <link-entity name="systemuser" from="systemuserid" to="systemuserid" link-type="inner" >

         <attribute name="fullname" />

         <link-entity name="organization" from="organizationid" to="organizationid" >

           <attribute name="localeid" />

         </link-entity>

       </link-entity>

     </entity>

    </fetch>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans