Hi everyone! - If you are depending on some client...
# suitescript
m
Hi everyone! - If you are depending on some client scripts for validation and data sourcing, and then you started creating records using the API, is there anything that can be done other than converting the logic to UE scripts?
a
theoretically, if they're creating them in dynamic mode then the same client script logic should run... but you'll want to test it, not sure if Celigo gives you the option to chose dynamic mode EDIT: this was just pure lies on my part
speaking more broadly... client scripts are usually to prevent user errors... an integration should have its own validation, or the source system should have it there?
m
@Anthony OConnor
theoretically, if they're creating them in dynamic mode then the same client script logic should run
Yeah, we tried that quickly, but some of the logic should run at certain steps. If the client code was using
pageInit
,
lineInit
and
saveRecord
only, it would have been easy, but it uses
fieldChanged
also for example. Some of the scripts also uses Web APIs like
window
and
document
@Tyler Lamparter Thanks... we are not using Celigo, I was just wondering how it is done. But I don't think that this would solve this case. But thanks for the reference.
t
Np! Yeah I don't think this would solve it either. Probably need to convert what you can to user event
m
I've never heard before or observed that client scripts run when records are created server side in dynamic mode. Do you have a source for this?
a
... can't believe no one else called me on that, yeah that doesn't sound right at all, I shouldn't answer questions on the weekend 😄
m
Lol already Monday afternoon here 🇦🇺
@Tyler Lamparter It looks like the documentation page you shared might have gotten corrupted
a
lol right i saw your flag
t
@michoel I was hoping docs would have it fixed before someone called it out lol
n
I always put validations in both CS and UE. Because records are also created via CSV in addition to web services/integrations.
p
This is why I always consider re-usability and modularity every time I write my script. My core logic always resides in the custom modules, while UE, CS, and MR (etc) only consume these custom modules and act as controllers. You never know when you will need the same function again.
👍 1