:slightly_smiling_face:, How abt updating a custom...
# suitescript
v
🙂, How abt updating a custom record -> Name it print logger (its an additional workaround but atleast that'll get your job done )
t
@Vaid Sorry, I'm not sure what you mean
v
You're trying to log number of times SO print button was clicked & on before load you tried to edit the same SO & save it which gave you an unknown error, so may be you should edit and save a custom record connected to that SO every time context.type === 'print'
In theory SO edition should work too , but for whatever reason that is giving you issues - you can always edit and save a child custom record(to maintain a tracker of sorts)
t
@Vaid Sorry for the silly question but how would I attach the new custom record to the sales order?
v
message has been deleted
@Tyler On your custom record, create a field - "Parent SO"
When you set SO id in this field it will be visible under SO (although selecting Record is Parent is optional, since you can source the value back to SO any way)
t
Ah I see what you mean! I was able to pull this off which has renewed my efforts to update the actual SO itself. Hopefully I can get it to work