Currently I added two fields as control filters in schedule board.
The fields are also available in work order.
Is it possible to auto populate the the corresponding field values to the schedule board while create booking from work order.
Currently I added two fields as control filters in schedule board.
The fields are also available in work order.
Is it possible to auto populate the the corresponding field values to the schedule board while create booking from work order.
Dear Alexander,
Thank you for your valuable response.
Fields can inherits from work order to resource requirements When a requirement is created ,Is it possible with custom fields.
Thank you for your time and consideration.
Regards.
You can find documentation here: https://docs.microsoft.com/en-us/dynamics365/common-scheduler/developer/understanding-and-customizing-resource-matching-in-urs
What I did as a simple example: Open the board's advanced settings>Open Default Settings. Navigate to your desired schedule type, Schedule Assistant Filter Layout. Pick the default template and save as new. I didn't have Property, so I added the Project as an example:
<control type="combo" source="entity" key="Project" inactive-state="1" label-id="Project" entity="msdyn_project" multi="true" />
This will give you the new filter:
Now save a copy of the default Schedule Assistant Retrieve Constraints Query and add this line:
<Project ufx:select="lookup-to-list(Requirement/msdyn_projectid)" />
This will prep-populate the project from the resource requirement:
For your case, replace Project with your desired field and entities.
Dear Alexander,
I think my explanation was not proper enough.
We need to pre-populate certain values from work order to the schedule assistant filter
Please find the screenshots
When I click on the book button from work order ,the values(project and property) should pre-populate to the schedule assistant filters.
Can you please advise how can achieve this using Retrieve Constraints Query
Please find the screen shots below were the resource type value(contact) from the resource requirement is
pre-populated to schedule assistant filter(Resource Types)
Like this When I click on the book button from work order ,the values(project and property) should pre-populate to the schedule assistant filters(Project, Property).
Thank you for your time and consideration.
Thanks and Regards.
Just as a clarification: This has nothing to do with bookings. It's all about taking details from the resource requirement and use these to populate the filter in the schedule board. When you then click "Book", the booking gets generated, but no information from the filter is taken to the booking.
If the above is what you're trying to do, yo should modify the filter layout for the Schedule Assistant (not the specific one of your board) and then the Retrieve Constraints Query.
I don't have sample code, but if you share screenshots of what you did, the community might provide some suggestions.
Dear Alexander,
Your understanding was right!
We want to want to pre-populate the schedule board filters with values from the work order.
we can add the required fields using Filter layout and Resource cell template but it will not
pre-populating from work order while creating bookings from work order.
we are try to implement it by modifying the Schedule Assistant Retrieve Constraints Query but it won't work
We are looking for the same process that while create booking from resource requirement entity the
resource type will pre-populate to the corresponding schedule board.
can you advice the same with an example, It will more helpful if you provide any documentation links for reference
Thanks and Regards
Not sure if I understand you correctly. Do you want to pre-populate the schedule board filters with values from the work order? If that's the case, open the advanced settings of your board, click on Open Default Settings, scroll down to Schedule Types>Work Order and modify the Schedule Assistant Retrieve Constraints Query.
Hello Akshay,
As I know, there's no OOB function to transfer parameter value between different forms.
I would suggest one concept of localStorage property. (MS doesn't recommend DOM operation in D365.) You could insert following
SetLocalStorage() function to Work Order Form OnSave Event to store these 2 fields value.
RetrieveStorageValue() function into Booking Onload Event to retrieve 2 fields value from LocalStorage and release storage then.
function SetLocalStorage(executionContext) { var formContext = executionContext.getFormContext(); var project = formContext.getControl("new_project").getAttribute().getValue().toString(); var property = formContext.getControl("new_property").getAttribute().getValue().toString(); localStorage.setItem("Project",project); localStorage.setItem("Property",property); } function RetrieveStorageValue(executionContext) { debugger; var formContext = executionContext.getFormContext(); var project = localStorage.getItem("Project"); var property = localStorage.getItem("Property"); formContext.getAttribute("new_project").setValue(project); formContext.getAttribute("new_property").setValue(property); localStorage.removeItem("Project"); localStorage.removeItem("Property"); }
Referred Doc: https://passion4dynamics.com/tag/use-localstorage-to-map-values-from-one-form-to-another-form-in-crm/
Hope above would help.
Regards
Johnny
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,317
Most Valuable Professional
nmaenpaa
101,156