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

Announcements

No record found.

News and Announcements icon
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 221

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:
I have the same question (0)
  • Verified answer
    Thomas David Dayman Profile Picture
    11,323 on at

    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.

  • Arsen Aghajanyan Profile Picture
    221 on at

    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.

  • Suggested answer
    antc Profile Picture
    2,911 on at

    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
    221 on at

    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 :)

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 > Field Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans