Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

get the current log on user from word template

Posted on by 5

i already have the word document template defined and uploaded back to CRM d365.
when select an entity record and generate a document from the Word template, i want to display the currently log on CRM user's full-name on the document. how i can define these on my template?
thanks


my document should be like following:

{document info with some entity information}

Sincerely,

{my name, or any CRM user calling and generating the file}

  • takeone Profile Picture
    takeone 17 on at
    get the current log on user from word template
    Hi @ruonan59, have you been able to get the currentuser in Word template? If so, can you please explain how you fixed it? Thank you!
  • ruonan59 Profile Picture
    ruonan59 5 on at
    RE: get the current log on user from word template

    hi Kokulan,

    thank you very much for the reply. your suggestion is working, except if multi user logged on the same record on the same time, the first user cannot get the correct log on user value if he/she generated the document after the second user logged on right?

    i will still mark your answer as suggested anwser since it will work most of the time. thank you!~

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: get the current log on user from word template

    Hi

    Please add a new field to the entity called - Current User and OnLoad of the form, using javascript you can update the curren user.

    In other words, as soon as someone opens that record, the current use will be set javascript.

    And in your word template, you can use the Current User lookup to insert any value from user recrod, name or title or anything you like

    Let me know if you need any help with getting the current user and setting it on a record.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans