Is there a way for a UE Script to know what URL th...
# suitescript
j
Is there a way for a UE Script to know what URL the user is on?
a
url.resolveRecord?
UE script has to run on a record right? so that record would be the URL? or are you meaning something more than this, I guess you must be, but I'm not clear on what you're trying to accomplish. generally speaking a UE is a server side script and so the window.location of the user wouldn't be available
j
it’s getting triggered from Webstore
I am trying to find what URL is calling a “create” context on Sales Order
a
a suitecommerce store?
j
nah, old SiteBuilder
we don’t actually sell anything online, it’s just a website really
yet something is hitting
create
on SalesOrder. Verified via UE and Workflow.
a
can you possibly just return false from a before submit UE if the context is webstore? since you don't actually use webstore to create SOs that should be ok right? as a bandaid, not to solve your underlying issue obviously
j
it’s not actually creating anything, I just wanna know what’s hitting SO in create mode
as there’s nowhere on our site that should be doing that.
b
site builder is weird and triggers client scripts that run serverside
so you probably want to try checking your client scripts
j
I have both WF and UE triggering, but not sure from either how to determine anything about the page that’s doing so (user is null, context.request is null). I tried redirect but that doesn’t actually execute (thought maybe I could redirect to a Suitelet and look up the URL Referrer). It’s driving me mad trying to know what page is being hit by a bot or something that’s triggering a SO Create context.
no client scripts deployed explicitly to SO, just a few that are included via UE
b
as in a client script deployed on one of the records exposed in your site
j
why would that client script cause SO Create to get called though.
I’ve looked through all our code, can’t find any calls to record.load that might cause it
b
i wouldnt expect any call to record.load to trigger a create event
that would be record.create, or older, nlapiCreateRecord there is also record.transform, or again older nlapiTransformRecord
the workflow equivalent would be the create record or transform record actions, though that would be pretty weird to find in a workflow
j
oh right
still nada
not a big deal in the grand scheme of things, it’s just in my head now and I need to knoooooow
😂 1
our site is pretty minimal and basic, absolutely no idea where “they” are clicking to make this happen multiple times a minute.
b
you can try making an inline html field in the beforeLoad to see if you can try gettting a script element to run
j
ooh sneaky
I think the “form” isn’t actually rendering so the element never appears and script never runs