I have a problem with setting a dynamic document property via Custom Scripting.
The screenshot below is setting the dynamic document property inside the "IF" statement. This is working fine.
The second screenshot (below) is setting the dynamic document property outside the "IF" statement which I prefer because I will add more conditions and just set the variable tranType instead of copying the props.setProperty to every condition.
Can someone explain why the second code encounters an error in Boomi?