We have 1-M relationship between Contact and Resource Entity. When click "Create" on "Resource Forecast" entity list page, the contact gets set to the login user however we also want to be able to by default set equivalent resource lookup value. Every portal contact is also set as Resource in CRM.
I wonder if we need FetchXML or WebAPI call in Entity list to only execute when "Create" is clicked therefore pass contact guid and retrieve equivalent Resource record from CRM and set the lookup value here (screenshto attached)?
Solved! Go to Solution.
You can achieve your requirement by creating a workflow on create of "Resource Forecast" entity. You have to update Bookable Resource field from Contact field.
Workflow won't execute until the record is saved whereas in our case we want to set the value as soon as the Create button is clicked therefore form is loaded.
you can achieve that via JS
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Thanks. As per your first link shared, the Odataset and views is the same as entity list whereas in my scenario, the entity list is a different entity(Resource Forecast). And the 2 lookups required to be set on the create form for Resource Forecast are from different entities (Resource and Contact). So I am not sure if suggested solution in the link would work here?
it's not a problem if it is the same entity.. I am not sure if you can use the same Entity List though, I would create 2 different Entity List records.. one to be shown in the Portal.. other with the oData flag enabled
via oData you will retrieve the record ID.. so via JS you can populate your lookup with the record ID
I'll look into the option you suggested. However I have written FetchXML in a web template therefore able to retrieve the Guid from the resource record (attached screenshot).
Now the question how do I setup the resource lookup value on the create form so it is only set when "Create" is clicked from the entity list web page? I tried to setup the lookup value in web template within Fetch XML result however it didn't work.
you can add custom code to validate fields on the submit button.. I guess that's the best place to put your logic
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.