- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
For the Application Development Fundamentals On Demand Course, I created the "Set Scratchpad Values" business rule as shown below in the course documentation for the Module 4 lab 4.2b on Scripting, but the rule isn't working properly.
I added the following code to troubleshoot and received the error shown below.
I tried to debug by setting a breakpoint at line 4 and executing using the Loaner Request record shown above. The Script Debugger first indicated the "requested for" for the Current1 Local instance wasn't found but then showed as follows.
Can someone advise why this is and how to resolve?
Could this issue be due to timing?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Did you get a chance to review this ?
If this helped to answer your query, please accept the solution and close the thread.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hmmmm that's really strange... @toddthigpen can you please verify it is in the desired scope, if it wasn't required to perform it with an impersonated user and alternatively, try to delete the business rule and re-create it again from scratch?
The labs sometimes get stuck in point of no return and it might be easier to step back and start again... just the last step, not completely from the beginning..
/* 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
Hi @GlideFather .
Yes, I did delete the original value and entered the content using the SetScratchpadValues macro as stated in the lab instructions. After testing per the lab instructions, I saw that the 'Location to be used' field in the Loaner Request form wasn't populated as per the 'Requested for' user selected. I added the try/catch statements to verify the City and Country fields were being passed to the 'Set Loaner Request' client script. It appears that they are not.
To verify again, I just removed my code and entered it again using the macro. I also verified that this Business Rule is configured to execute when display.
As shown below, the 'City' and 'Country' fields are populated for the user but the '' field isn't populated in the Loaner Request record.
Please advise.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @GlideFather.
Yes, I did delete the original value in the business rule and entered the content using the SetScratchpadValues macro as stated in the lab instructions. After testing per the lab instructions, I saw that the 'Location to be used' field in the Loaner Request form wasn't populated and added the Try/Catch statements to see if the City and Country fields were being passed to the SetLoanerLocation client script.
To check again, I just removed my code and tried again with the code provided by the macro. I also confirmed that type is 'display.'
As shown below, the 'Location to be used' field in the Loaner Request form isn't populated per the City and Country fields for the selected 'Request for' user.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Did you create client script that would use scratchpad values ?
To validate the lab, you need to follow the section 'Testing the Business Rule and Client Script' thoroughly.
Go to sys_user.LIST in list view and add fields 'City' and 'Country Code' from personalize list view. Take a sample user and set 'City' and 'Country Code' values.
Go to loaner request table in list view, add 'Requested for' and 'Location to be used' fields from personalize list view. From the list view, set 'Requested for' value for a sample record [this is on list view and NOT on form view] and save the changes. Open the record in form view and it should display 'Location to be used'.
If this helped to answer your query, please accept the solution and close the thread.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Did you get a chance to review this ?
If this helped to answer your query, please accept the solution and close the thread.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Because my lab instance expired, I reperformed all of the labs and the testing for lab 4.2b was successful. Now the 'Location to be used' field is populating as per the 'Requested for' user.
I'm not sure what went wrong before.