Can we call a userevent aftersubmit from a map/red...
# suitescript
s
Can we call a userevent aftersubmit from a map/reduce script ? \
m
could you tell us more about the problem?
i mean the after submit is triggered after a record is saved and a map reduce is supposed to be run as a batch process, so i dont understand what you need to do
s
in a map reduce there is a logic to update status of a record to approved or pending based on condition. and there is a existing user event (aftersubmit) which has logic to execute a business logic if a status changes to approved. in mapreduce we are doing record.save() but the map reduce does not fire. thats why we were thinking to call the userevent manually in the map reduce right after setting approved status condition.
b
user event scripts trigger in response to map/reduce scripts
double check that the audience/context filtering/type filtering or whatever other filtering is done isn't excluding the map/reduce script
s
Thanks, its selected .
any other points i need to cross validate ?
b
audience
the code of the script itself
s
Audience > Roles, Employees all selected.