How To Add Work Hours Form into Unified Client Interface (UCI) Form

In a previous post, I demonstrated how to add the Schedule Board into Unified Client Interface (UCI) App or Unified Interface (UI) App.  Microsoft is working hard to get UCI feature parity with Web UI but some important features are not there yet.  In this post, I am going to demonstrate how to add the Work Hours Form into a Unified Interface form.

Work Hours Form in Web UI

Open the Resources view.

Option 1: Field Service > Administration > Resources

Option 2: Resource Scheduling > Scheduling > Resources

Option 3: Project Service > Resources > Resources

Click on a Resource to open the record.

Resources View

Click on the arrow next to resource’s name and click Work Hours.

Resource Form

You can now see the Work Hours Form.  This form is used to set the work hours of the resource.  In this post, I will not go into details about how to set up the work hours.

Resource Work Hours Form

Add Work Hours Form into Resource Form in UCI

In UCI, Work Hours form is not available.  Following steps are required to display the Work Hours form in Resource form.

Step 1 – Create a Web Resource which displays the Work Hours form

Step 2 – Insert the Web Resource to a section in the Tab

Step 3 – Add a new Tab “Work Hours”

Step 1 – Create a Web Resource which displays the Work Hours form

Below are the important sections in the code.

Get the Base Url of the instance

Get the GUID of the Resource

Configure the Url of the Work Hours form

formid is a constant for all instances.

oId is the Resource record’s GUID.

oType is a constant for all instances.

iFrame to show the Work Hours form

Note that the src attribute is empty.

The OnLoad() function runs on load of the form.  It extracts Resource record’s GUID and creates the full Url of the Work Hours form and sets the src attribute of the iframe.  Create a web resource and publish.

Step 2 – Insert the Web Resource to a section in the Tab

Now Insert the web resource into the section on the Work Hours tab.

Insert Web Resource

Insert Web Resource - General Tab

Insert Web Resource - Formatting Tab

Note the settings of the above images.  Layout = One Column, Number of Rows = 20, Automatically expand to use available space = tick, Scrolling = As Necessary.

Click OK and Publish the form.

Now the Work Hours form is visible on UCI Resource Form.  OOTB, UCI Apps don’t have the Bookable Resources entity.  You’ll need to add that in.

Work Hours form inside Resource form

Thank you for visiting Dyn365Apps.com.

Follow me on Twitter to get the latest news, tips and tricks and more …

Until next time…

About the Author

Nadeeja Bomiriya is a Microsoft MVP, Chapter Lead – Dynamics 365 Saturday – Australia, President – Melbourne Dynamics 365 User Group, Technical Architect, and Dynamics 365 Practice Lead who lives in Melbourne, Australia.

[How To] Add Work Hours Form into Unified Client Interface (UCI) Form