I have a Multiple Records form that has Ajax OnClick events for some checkboxes when a checkbox is selected then editing a text field on that record needs to be disabled. I need to control each records fields individually from the onRecord event and from the onClick Ajax event. The issue is I do not have the same macros available or the macros are available but they behave in a different way based on the event. Examples Following…
Option 1
onRecord will check if the checkbox is checked and will use sc_field_disabled_record() function to disable the text field. This works perfectly from the form loading aspect but using the onClick event this macro is not available so I can not enable the field or disable any more fields based on the user’s selection.
Option 2
I will use the sc_field_readonly macro as it is avialable for use in both events. Now we run into the issue where it behaves differently onRecord it will set every field on the Multiple Records form to the last set readonly. I know sc_field_readonly has more control over individual records because on the onClick event it will make just the records field readonly.
I need an option to fix this or they need to make their macros work the same in every method or add the sc_field_disabled_record() macro to the onClick event. I do not understand what would stop them from that. I could also do this in javascript but I do not know how to find number of the record that the user have clicked to update a specific field number to have a disabled flag from the onClick event.
Thanks any help would be greatly appreciated.