Subform Time field to string.
Good afternoon All.
I have a Subform 'Delivery_Receiving_Hours' that captures Day (Dropdown), Time_Open (Time), and Time_Close (Time). I need to capture this data and send it to a multiline field in the CRM. The code, posted below, below will capture the day but keeps posting the time as N/A. I am performing the tests and I am putting time in. I can't figure out why it's not capturing the time input. Any help would be greatly appreciated.
- // Initialize the combined information string
- combined_info = "";
- // Access the subform and iterate through its rows
- for each row in input.Delivery_Receiving_Hours {
- // Check and retrieve values for Day, Time_Open, and Time_Close
- day = ifnull(row.Day, "Unknown Day");
- time_open = ifnull(row.Time_Open.toString("hh:mm a"), "N/A");
- time_close = ifnull(row.Time_Close.toString("hh:mm a"), "N/A");
-
- // Concatenate the current row's information
- combined_info = combined_info + day + ": " + time_open + " - " + time_close + "\n";
- }
- // Log the combined information for debugging
- info "Combined Info: " + combined_info;
- // Update the CRM field with the combined information
- newLocation.put("Dock_Hours", combined_info);