Hi Suthagar
Besides the excellent suggestions from my colleagues in this thread, please put an IF around this part of the script with the pop-up for class type and only do it for the first transaction

You will only be prompted once for it.
Note in this screen shot I also used the filter on the pop-up, so that I know for sure which class type I'm choosing:

there's a dropdown to pick first transaction

it ends up looking like this

Again, for the first material, the class type selection will pop-up. For all subsequent materials, it will not.
Hope that helps,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
------------------------------