Why is my deluge code not executing properly? (New and learning deluge)

Why is my deluge code not executing properly? (New and learning deluge)

I'm trying to update a sales order number through deluge for an automation I'm trying to build. What is wrong with it?

  1. /* replacing SO with SOR for sales order pre-fix */

  2. SO = salesorder.get("salesorder_number");
  3. replace = SO.replaceFirst("SO","SOR");

  4. /* display the above code when executed */

  5. info replace;

  6. /* this is where I start to lose what I'm doing unfortunately. Help me explain where I'm going wrong in updating the SO number here */

  7. SOR = Map();
  8. SOR.put(salesorder.get("salesorder_number"), replace);

  9. update = zoho.books.updateRecord("salesorders",organization.get("organization_id"),salesorder.get("salesorder_number"), SOR);
  10. INFO update;
I get the following error messege. 


    Nederlandse Hulpbronnen