Sage 300 macros failed after upgrade

SUGGESTED

Hello Dears,

I upgraded sage 300 from 2018 to 2023 and two of the macros added not working as well. 

here is the error image that appeared when I run the macro.

what should I do and is it from the upgrade?