Hmm The electronic payments bundle has a custom re...
# suitescript
f
Hmm The electronic payments bundle has a custom record where the form changes based on a dropdown (the file type) Does anyone know how that works? Like showing different form fields based on a dropdown?
j
I think it performs a
nlapiSubmitField
and
window.reload
immediately after
then the pageinit client script should rearrange the page with the new options
just making sure, I think you're talking about the behavior where it prompts you just before reloading that "this field will save", right?
f
no
I am talking about when selectin file Type 1 i see field 1, and field 2 but when selecting file type 2 I see field 1 and field 3
but it does not seem to be a custom suitelet they are using. Its the normal add record screen
j
right. I saw this behavior on the Company Bank Details custom record when you change the EFT Template
f
Yes correct that behaviour
j
yeah. you'll notice that it reloads the page -- this can't work dynamically without the refresh
f
but how do I inject some sort of custom script into a netsuite default page?
j
I would deploy a user event. I was mistaken, this can't be accomplished through a client script
f
But a user event script can not listen for changes to the form to reload it etc?
j
correct. you would need to deploy both a client script to listen to the field change and trigger the reload, and then the user event will trigger an on-load operation to either set the correct form or add/remove fields
f
ah ok thanks 🙂
j
(I think we can quietly agree that the solution netsuite implemented with the EFT bundle is a little ... um ... unorthodox)
👍 1
f
Yeah but it seem to work. I am currently looking into alternative creating a custom page (see my other question in the channel) but not sure how that works and if that is any better