Updating Blueprint stage from my Deluge function

Updating Blueprint stage from my Deluge function

Hi all,

I need to update the blueprint stage. Its almost working, but ONLY if the current Deal stage is 'Closed Lost'. On any of my custom stages that Ive specified in the pipeline it doesnt work!

My code:

  1. dealmap = Map();
  2. deal_stage = deal.get("Stage");
  3. dealmap.put("Stage","Viewing Booked");
  4. info deal_stage;
  5. updatedeal = zoho.crm.updateRecord("Deals",deal.get("id"),dealmap);

Any ideas? Thanks