Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Field Service forum / Transfer custom fields...
Field Service forum

Transfer custom fields whenever work order is created from Agreement

(0) ShareShare
ReportReport
Posted on by 219

Hi all

I'm working on the agreement to work order process in the field service. I'm able to choose customer asset in the agreement booking incident record and it transfers that customer asset to the work order level. However, I have several custom fields in customer asset entity that I want to transfer to the work order, which will be created by an agreement. I can't find a proper way of doing this.

I tried to make a work order OnCreate plugin to retrieve these fields but at the time of execution, the lookup is empty.

Thanks,

Arsen.

Categories:
  • Arsen Aghajanyan Profile Picture
    Arsen Aghajanyan 219 on at
    RE: Transfer custom fields whenever work order is created from Agreement

    I'm doing that, obviously. But what if I manually update customer asset field on an existing work order which was created by an agreement and has a lookup to the agreement? I don't want the plugin to fire in this scenario.

    This is not a big problem though. Just a bit optimization for the system :)

  • Suggested answer
    antc Profile Picture
    antc 2,909 on at
    RE: Transfer custom fields whenever work order is created from Agreement

    Just check if msdyn_agreement on Work order which is a lookup to Agreement is null or not in your plugin.

  • Arsen Aghajanyan Profile Picture
    Arsen Aghajanyan 219 on at
    RE: Transfer custom fields whenever work order is created from Agreement

    You're right, Thomas. Thank you!

    Actually, the Agreement Lookup gets populated on creation. But, the Customer Asset lookup is generated after a work order is already created. So, I was able to achieve my goal with an update plugin. The only problem I want this plugin to fire only if the work order is created by an agreement. Do you know a way to achieve this in a plugin?

    Thanks,

    Arsen.

  • Verified answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Transfer custom fields whenever work order is created from Agreement

    Check to see if the Agreement Lookup gets populated by an update rather than create?

    It may be that the Agreement Lookup gets added after the work order has been created.

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... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans