Transform your organisation with Microsoft Dynamics 365
Use Power BI for in-depth business intelligence
Fully functional, cross platform, desktop, tablet and mobile apps for your business
Powerful document management, content management and collaboration
Transform how you manage your membership with Subscribe 360 powered by Dynamics 365
Work smart, work less, and do more with Microsoft Flow
The C2 consultancy team are the catalyst for delivering business transformation
C2's development team configure and customise Dynamics 365 and SharePoint for your business
C2 have dedicated professional trainers and change management experts on-hand
Our support team help ensure staff get the most from your investment
Get the most out of your IT investment with Planning Services for Dynamics 365
C2 specialise in implementing Microsoft Dynamics 365 and SharePoint to transform your organisation
ABTA is the United Kingdom's foremost travel association
The Family Building Society - a new society, created for the way we live today
Origo is the eCommerce standards and services body for the UK financial services industry
The General Teaching Council for Scotland regulates the teaching profession
Belfast City Council is the local authority for the city of Belfast
View all of our Case Studies
A selection of in-depth papers on business transformation
Check out C2’s upcoming events, we hope to see you there
C2’s previous newsletters offer a selection of business transformation insights
Have a look through our Dynamics 365 videos in our e-Learning hub
Visit the Resources Hub
Business transformation insights with the Microsoft cloud
Subscribe to our RSS Feed to get the latest updates
Our DNA for success comes from the people within C2
Find out more about who we are and what we do
Meet the key people behind C2 that keep our business ticking
Looking for a career in the fast evolving technology industry?
Get in touch to discuss your business transformation project
Membership, conference and event solutions on the Dynamics 365 platform
Pledge and donation management in Dynamics 365 for charities and not for profits
Business transformation solutions for the finance industry
Explore our specialist areas
Back to Blog Listing
When using CRM online it is sometimes necessary to create custom workflow steps. These are bits of code written in the .NET environment and allow a much greater level of computation than the standard workflow step functionality from within CRM.
When customising a CRM used in a live business environment it is often prudent to have more than one instance of the CRM available, i.e. a live and test environment. When using more than one environment however with the same code base it is often necessary to dynamically know which organisation/environment you are currently using. The code depicted below can be used within a "CodeActivity" class (the .net class type used when creating a custom workflow step) to return the name of the organisation.
IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
orgName = context.OrganizationName;
James CTwo is our blogging alter ego for the Dynamics CRM and Web experts here at C2. We have a passion for anything CRM, Web Design or Social Media. We love writing about it! Find us on YouTube & Twitter.
"Discover the content that matters to you on business transformation. Explore how you can drive customer engagement, empower your team, optimise your businesses and revolutionise your products with the next digital revolution. For more information visit our white paper library."
Our newsletter is sent on a quarterly basis, offering detailed insights into all aspects of business transformation with Microsoft cloud technologies. We also promote upcoming events and special offers throughout the year. Sign up to get involved today.
© Copyright C2 Software