Fix: try to fix regression, stored the last id created in a session
variable in order to be used to find out information in the "ref_ext" in
order to differentiate automatic actions.