CRM2013: Get Business Process Flow and Stage GUID’s in SQL

Currently have a requirement from a client where they require a lead to be defaulted with the correct business process flow and stage based on where the lead was generated (through their web portal) The information is stored in the¬†FilteredProcessStage view in the organisations database. The query below will output the process and its stages […]