has anyone ever found a way to get the value of a ...
# suitescript
a
has anyone ever found a way to get the value of a field which is added to a standard record via a beforeLoad script (aka a custpage_xxx field, added via a bundle script so we can't change it) into a normal custom field (we want to be able to search on it)? i'm assuming it's going to be some ugly combination of multiple scripts, but if anyone has attempted or thought about this before, i'd be open to any ideas/suggestions.
s
You could certainly make another field and use a wf/script to set that value and check the
global search
box on the new field. (I guess this might not work since it's added beforeLoad and not stored). You have to store the value to make it globally searchable, else I would say just source/default it. It seems strange that a field added via beforeLoad would be important enough to search globally, could you instead make your own field that has the information that field is providing?
a
that's not a terrible idea to just get to the same data ourselves and put it into a new field.. i agree they shouldn't have added the field beforeLoad! it's from the SuiteApprovals bundle, it stores the "next approver(s)" in a beforeLoad field so we can't create any searches where next approver = me. pretty basic stuff you'd think!
s
hi amy, can i just challenge you and actually load that record, either via plugins or via chrome extensions to prove that from the suiteapprovals bundle it generates a custpage_field that's not achievable
but if you are using suiteapprovals, unless you're doing crazy approval limits, a workflow will already handle it quite nicely (where everything then becomes under your control) if it does have crazy approval limits and routing, scripting isn't too bad , i've done it before and with custom records it can be extremely flexible and exremely dyna imc
a
yeah, if we could go back in time we would not have suggested suiteapprovals to them for sure and built our own custom WF process instead. but since they're already live with it we're trying to come up with a bandaid in the meantime.