It doesn't look like a prospect or customer's `aft...
# suitescript
d
It doesn't look like a prospect or customer's
afterSubmit
entry point is being hit when you create a sales order for the prospect (which converts the prospect entity into a customer) Does anyone know how to capture this edit on the entity record, rather than adding a UE to the sales order?
c
My first thought would have been afterSubmit on the SO. Any reason why you don't want to do that?
d
just that the logic is already in a customer UE for the
create
context. So would be duplicating all the logic over to a SO UE script....
Might modularise it tbh and the SO and customer UE can just call the module's function
Also interesting to note. When converting a prospect to customer directly in the UI, the afterSubmit context's
oldRecord.type
and
newRecord.type
are both "prospect" Would expect the
newRecord.type
to be "customer"
b
Not very surprising, newRecord represents the record as submitted
It was submitted as a prospect
💡 2
d
that does make total sense then