Client Script in a Record Producer for a Reservable Module
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I have created a record producer in my Reservable Module. In this Record Producer I would like to reference some of the reservation data in the client script. Is there any way to reference or access the data gathered in the reservation? I see 2 or 3 global variables begin passed to the record producer but nothing regarding the reservation details. I didn't have any luck trying to reference the DOM either.
The scenario is that I want to hide/show certain record producer variables based on the room(s) selected for the reservation. i.e. if a user selects room x, show question 2.
The reason for doing this in one module rather than creating an additional module is because it's the one reservable module that is configured for sync with Exchange. And I don't want to touch a high or medium risk widget or script include.
Any suggestions would be helpful.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Bill B_tjene,
please share more details..
If it is a record producer (frontend) then it will be a catalog client script calling a GlideAjax (script include) to fetch any data.
Example: variable A is populated, there would be catalog client script onChange applied on this field/variable and the CCS will get the data from backend from GA call and the answer can help you design the desired behaviour - hide/display other variables as per the selected value in variable A.
For a simple GlideAjax, follow this legendary post :))))
GlideAjax Example Cheat Sheet (UPDATED)
Let me know if this makes sense to you or you need more details.
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you for the response. As I understand, the GlideAjax method works with an existing record, but in the reservation details, a record doesn't currently exist. The data is only contained within the content item, "New general reservation" (widget WSD Reservation). Below is a screenshot of the reservation details page, with the additional record producer embedded in the page/widget.
I understand that data can be shared between widgets on a page, but the parent widget needs to provide the data to the children via variables.
Assuming I cannot modify the parent widget (high risk), "WSD Reservation", are there any alternatives?
Thanks again