Object reference not set to an instance of an object

This error seems to be a catch all that you may see in the MEP Transaction Workbench from function calls or while publishing applications. Below are some causes and solutions that have been identified.

Transaction Workbench

  1. CAUSE: Data being passed into a parameter too large for the parameter. For instance if you have a parameter that accepts 2 chars on the API but you pass 3 you may get this error.
    SOLUTION: Make sure all of your parameter values are the correct length for the API processing it.
  2. CAUSE: Similar to the above but data type instead of data length. This is most commonly seen with a text value being passed into a number field so start there
  3. CAUSE: Other data possibilities. Check all the values passed to the API that they are valid. And example would be the line number being passed that doesn’t exist on the order being processed. Or an invalid item number.
    SOLUTION: double check all values passed into parameters are correct for the API.

Publishing Apps:

  1. CAUSE: In multi-tenant or multi-server environments it can happen that one server is out of sync from another. For example one server may have a different published version than the other. This can happen for back end reasons but has also been observed when doing development in multiple tabs at the same time for subapps and apps that call those subapps.
    SOLUTION: If you were working in multiple tabs, check everything in and republish. If you were not, clear your browser cache, sign out and close the browser, then get back in and try publishing again.
1 Like