Showing posts with label CRM. Show all posts
Showing posts with label CRM. Show all posts

Thursday, June 27, 2013

How to convert the DateTime in Local and UTC Date Time format

While working with the plug-ins or with Custom Workflows Assemblies, we get the Datetime from CRM which doesn’t match with user’s Local DateTime format.

As we get the date from the CRM in UTC Format so we can convert it to User’s Local DateTime using LocalTimeFromUtcTimeRequest Request.

To get the Current logged in user’s Local time You need to first retrieve the Time Zone code of that user using RetrieveCurrentUsersSettings request and then you need to convert the UTC date into user’s Local DateTime.

We can also convert the Date from Local Datetime format  to the UTC Datetime Format.

Below examples illustrates how to write LocalTimeFromUtcTimeRequest  and UtcTimeFromLocalTimeRequest request to convert the Date.

Example :

First retrieve the time zone code from UserSettings entity and then excecute request LocalTimeFromUtcTimeRequest to convert the DateTime from UTC Format to Local DateTime format and UtcTimeFromLocalTimeRequest to convert the DateTime from Local to UTC DateTime format as given below.

                        
DateTime convertDate = new DateTime();



           //get the Time Zone Code of user

            int? getTimeZoneCode = RetrieveCurrentUsersSettings(service);



//Convert the UTC Date time into Users Local DateTime Format using request LocalTimeFromUtcTimeRequest

            DateTime localDateTime = RetrieveLocalTimeFromUTCTime(convertDate, getTimeZoneCode, service);

            //Convert the Local Date time into UTC DateTime Format using request UtcTimeFromLocalTimeRequest

            DateTime utcDateTime = RetrieveUTCTimeFromLocalTime(convertDate, getTimeZoneCode, service);



        /// <summary>

        /// Retrieves the current users timezone code

        /// </summary>

        /// <param name="service"> IOrganizationService </param>

        /// <returns></returns>

        private int? RetrieveCurrentUsersSettings(IOrganizationService service)

        {

            var currentUserSettings = service.RetrieveMultiple(

                new QueryExpression("usersettings")

                {

                    ColumnSet = new ColumnSet("timezonecode"),

                    Criteria = new FilterExpression

                    {

                        Conditions =

                        {

                            new ConditionExpression("systemuserid", ConditionOperator.EqualUserId)

                        }

                    }

                }).Entities[0].ToEntity<Entity>();

            //return time zone code

            return (int?)currentUserSettings.Attributes["timezonecode"];

        }



        /// <summary>

        ///  Retrive the local time from the UTC time.

        /// </summary>

        /// <param name="utcTime">UTC Date time which needs to convert to Local DateTime</param>

        /// <param name="timeZoneCode">TimeZoneCode</param>

        /// <param name="service">IOrganizationService service</param>

        /// <returns></returns>

        private DateTime RetrieveLocalTimeFromUTCTime(DateTime utcTime, int? timeZoneCode, IOrganizationService service)

        {

            if (!timeZoneCode.HasValue)

                return DateTime.Now;

            var request = new LocalTimeFromUtcTimeRequest

            {

                TimeZoneCode = timeZoneCode.Value,

                UtcTime = utcTime.ToUniversalTime()

            };

            var response = (LocalTimeFromUtcTimeResponse)service.Execute(request);

            return response.LocalTime;

        }



        /// <summary>

        ///  Retrive the UTC DateTime from Local Date time format.

        /// </summary>

        /// <param name="localTime">Local Date time which needs to convert to UTC</param>

        /// <param name="timeZoneCode">TimeZoneCode</param>

        /// <param name="service">IOrganizationService service</param>

        /// <returns></returns>

        private DateTime RetrieveUTCTimeFromLocalTime(DateTime localTime, int? timeZoneCode, IOrganizationService service)

        {

            if (!timeZoneCode.HasValue)

                return DateTime.Now;



            var request = new UtcTimeFromLocalTimeRequest

            {

                TimeZoneCode = timeZoneCode.Value,

                LocalTime = localTime

            };

            var response = (UtcTimeFromLocalTimeResponse)service.Execute(request);

            return response.UtcTime;

        }









Monday, June 24, 2013

How to set Set ChartColorPalette.

We have ChartColorPalette property of charts to set different color palettes. If you do not want to specify custom colors for palette, at that time you can use following specified palettes.

The ChartColorPalette represents the palettes to be used for the root Chart object and any Series objects. If no colors are assigned to data points and their associated series, the default colors will be assigned to the data

Normally Chart palette is set to None means No palette is used and specified custom colors for chart. As shown below.



To avoid specifying custom colors you can set palette property values as follows. For that you need to change chart XML file and import that chart again.



Note: if you specify both Palette value(other than None) and PaletteCustomColors then Palette will overwrite PaletteCustomColors.

We have following values to set palette colors.

·         Berry - Palette will use blue and purple shades.



 


    Bright - Palette will use bright colors.





·         BrightPastel - Palette will use bright pastel colors shades.







           Chocolate - Palette will use shades of brown.





·         Earth Tones - Palette will use earth tone colors such as green and brown.



 


           
           Excel - Palette will use Excel-style colors.





·         Fire - Palette will use red, orange and yellow colors.
 
 


·         Gray scale -  Palette will use grayscale colors like shades of black and white.






·         Light - Palette will use light colors.






·         Pastel - Palette will use pastel colors.




·         SeaGreen - Palette will use colors that range from green to blue.




·         SemiTransparent - Palette will use semi-transparent colors.






















Thursday, January 10, 2013

Maplytics in times of UR12


Native Bing Maps Integration coming in with UR12

UR12 is scheduled for a phased roll out starting next week. With one of the offerings being Bing Maps Integration. This integration is made available as a setting that when activated by the users would show a link to open Bing Maps and automatically plot the address entered on the specified record.

What is Maplytics and why should you want to use it?

Maplytics continues to work towards being a “more than simple” address plotting on the map.  It is a geographical analytics tool. Some of the features supported include
·     Support for all entities that have address fields. You would be able to see any address included on any entity on the Map
·     Map is essentially dependent on Geo-coding data. Maplytics comes bundled with Bing Maps subscription that allows for use of Bing Maps Spatial service that will let you batch Geo-code bulk data. This does away with the need to worry about getting the data Geo-coded.
·      Save geographical search as static Personal Views in CRM
·      Ability to print the route and routing directions using multiple way-points.
·      Maplytics builds upon the inherent Dashboard feature of Dynamics CRM to provide Maplytics Dashboards to provide analytics based on CRM data including Sales
·     Color-coding CRM data plotted on the Map for better analysis and geographic representation of the data
·     Usual mapping solution would include Road View or Aerial View. You can now get a Street View of the address using Maplytics



Who is Maplytics for

Maplytics is still a must-have for business driven by geography and geographic data.

For more information check out the product details here

Monday, November 26, 2012

Maplytics Release Announcement !!


The much loved Geo-analytical tool for Dynamics CRM 2011 which uses Bing Maps API now has an update available that will make Maplytics a must have tool for Dynamics CRM

We have added the following new features in Maplytics 5.4 version,
    1.      Support for all entities defined in Dynamics CRM. Configurable entity maps
    2.      Ability to map the address fields to be used for Geo-coding
    3.      Color coding of pushpins based on configurable categorizations
    4.      Heat Maps added
    5.      Configurable tool-tips
    6.      Dashboards. You can now include Maplytics component as a Dashboard web resource
    7.      Dashboard   queries is configurable
    8.      Overlay of nearby locations like airports, restaurants etc. along with the Dynamics CRM search results
    9.      Ability to save the geographic search results as static views in Dynamics CRM for later use
    10.      Ability to export search results to external file
    11.      Ability to save the geographic search results as static views in Dynamics CRM for later use


For more details have a look at the White Paper

Maplytics supports all CRM Deployment models namely On-Premise, On-Line, Office 365 and Partner-Hosted.

It is supplied as a managed solution that is easy to install and un-install without affecting your existing customization.

We already have a 15 day fully functional trial available of our product. We are now also making available for a limited period only, a Community Light version of the product. This product is free to use for the next 6 months for up to 5 users after which you can order the product from us and upgrade to the unlimited full license of the product.

You can download the light version from http://www.inogic.com/Trial/DynaMapsCommunityVersion.zip. This is valid until 26th December 2012.

The light version has the following limitations.
    1.            Available for use with only account, contact and opportunity entities
    2.            Mapping capabilities restricted to plotting of 50 addresses at a time on the map
    3.            Only 5 dashboards can be configured
    4.            Only 5 way-points can be defined for routing


After downloading contact us with your CRM install details to avail the 6 month free license.

Contact us for the 15 day full trial of the product.

Note: Bing Maps API is chargeable and you need to purchase Bing Maps subscription from Microsoft. We have entered a contract with Microsoft Bing Maps partner to make this license available to you for use with Maplytics at a reasonable price.

Here is a complete list of features included in Maplytics:
    1.       Plot any entity record on the map
    2.       Street View for any address
    3.       Color coding of pushpins based on configurable categorizations
    4.       Routing using multiple way-points
    5.       Geo-spatial analysis of Opportunity and Sales data for summary analysis
    6.       Uses Dynamics CRM views that can be easily created using the Advanced Find feature of Dynamics CRM. No learning curve required
    7.       Print the Map and Driving directions
    8.       Configurable Entity maps and Dashboards to support any Dynamics CRM entity
    9.       Dashboards. You can now include Maplytics component as a Dashboard web resource
    10.       Dashboard queries is configurable
    11.       Overlay of nearby locations like airports, restaurants etc. along with the Dynamics CRM search results
    12.       Ability to save the geographic search results as static views in Dynamics CRM for later use
    13.       Ability to export search results to external file
    14.       Ability to save the geographic search results as static views in Dynamics CRM for later use

Go ahead and request the trials and pour in your valuable feedback!


Sunday, February 5, 2012

Maplytics now available for CRM 2011


We are happy to announce the availability for Maplytics for CRM 2011. The new version now supports all 3 CRM deployment models On-Premise, Online as well as IFD.

Maplytics is geo-analysis tool that allows you to view your CRM data on a map as well as allow your Sales Rep on the field to plan their schedule with the aid of Maplytics.


This new release supports Street View. Street View allows you to get a road side view of the address


You can also select multiple addresses and have the tool plot the route through the addresses selected.


Ability to Print the map as well as the route directions so that it can be circulated within the team.


It can now be added as a Dashboard component in your Dashboard.

Click here for more details.

Thursday, January 5, 2012

MVP Awarded!

2012 starts with a bang for Team Inogic. We take pride in announcing that one of our Team Members known to you all as Sam is now a Dynamics CRM MVP.

Well done!!!

Tuesday, February 8, 2011

Workflows vs Dialogs

CRM 2011 introduces the new concept of Dialogs. We have discussed this in detail in our earlier blog that can be found at http://inogic.blogspot.com/2010/11/crm-2011-dialogs-explored.html"
Here we list out the differences between Processes (Workflows) and Dialogs.

Friday, January 7, 2011

Sales Area Enhancements in CRM 2011

There have been considerable improvements in the functionality being offered in the Sales Area in CRM 2011.

Changes have been incorporated in the area of Opportunities, Orders and Invoices

CRM 4.0 Opportunities did not support adding of Write-In Products or Price Override. These attributes were present in the Opportunity entity in CRM 4.0 but not included on the forms. Even if you added them manually on the form, the functionality didn’t work. Here is a screenshot of the Opportunity Product in CRM 4.0



A major drawback was you could not create opportunities for write-in products.

But in the CRM 2011 the functionality of both Price Override and Product Override (Write-in Product) has been included.



Another change brought about in CRM 2011 is ability to enter negative quantity or amounts to create Negative Quotes/Orders/Invoices. This was sorely missed in CRM 4.0 when it came to being able to record Sales returns or Credit Memos.

In the below screenshot we added two products against the quote and it’s allow us to save it . One with write-in product with a negative Price Per Unit and another one is existing product which has negative Quantity assigned. This information flows down from Opportunity --> Quote --> Order --> Invoice as well.



As shown in below screen shot the totals are also updated on Quote header with amounts fields.



Note: You can’t set both the Price and Quantity to negative values when creating the line item otherwise it will display the following error to the user. You can set either the Quantity or Price Per Unit to negative value but not both.



With the inclusion of Negative orders and Invoices, Microsoft has tried to include a bit of accounting functionality to support recording of returns and credits. Payments is still something that has not been included in Sales Area. Yes it is CRM and not ERP but if it could go ahead and support Negative Sales, it would help if custom entity for Payments was included as well.

May be the next version :)

Tuesday, November 30, 2010

Workflows - Behind the scene

We were recently working on designing a tool that deletes workflow job. We thought it would be easy to just filter out all job that related to a workflow by the workflow id and then delete that’s it.

But like always we were in for a surprise. Just thought putting it down would help others in resolving this mystery.

Each Workflow has a unique id just like any other entity. But if you search for workflow jobs using this id to look for all jobs related to this workflow, you would be in for a surprise. It would not return all of the jobs that you are expecting. The reason being each time you revise a workflow i.e unpublish and publish the workflow once again, it creates a new workflow entry in the tables. If you want to look for the workflow jobs related to a particular workflow then you need to look for the workflow id assigned to each of its versions.

For workflow, you would find the following definitions available in the tables.


There will be only 1 definition record in CRM for a workflow no matter how many times you revise it.


But each time you publish a workflow it will create a new activation record.


The activation workflow record will have its parent workflowid set to the workflow definition id.

The workflow definition record will store the id of the currently active version of the workflow.

If you unpublish a worklfow and publish it again, it will add another row to the table and the status would now be as follows:


Note the activeworkflowid of the Definition record now refers the Guid of the latest version of the workflow that is published.

Now if you want to look for system jobs for this workflow, you will need to search for jobs that have their workflowactivationid set to any of the workflowid listed above in the table.

Hope this helps you find your way through the maze of workflows!!!

Wednesday, August 19, 2009

Maplytics for Dynamics CRM

Further to our post on Maps integration for Dynamics CRM using Live Maps https://community.dynamics.com/blogs/crminogic/archive/2009/04/27/maps-integration-for-dynamics-crm-4.aspx we have been able to compile a list of mapping components that can be made available on different entities of CRM with the aim of enabling Geo analysis of the data stored in CRM.The entities covered are:
1. Lead/Account/Contact – Plotting of the primary address of these on the map. It also provides the directions to the customer address starting from the organization address.

2. Plotting of Accounts from a selected range of Accounts that come within the specified distance. The aim here it to be able to list out all accounts that are within a given range from the Starting point.

3. Geo mapping of Leads/Accounts on the map with the aim to allow the users to analyze their customer based on geographical regions.

4. Geo mapping of Sales/Opportunity on the map with the aim to allow the users to analyze their sales by geographical regions and thereby be able to design strategies focusing on a given region.
Some of the features are:
Ø Each of these when plotted on the map allow the users to drill down ability and also be able to open Contact/Lead/Account etc CRM form to check further details of these.

Ø While searching for directions, you can specify the Route that you want to take and you would get the direction via the specified location.

Ø View Summary or Detail information

Ø Use of Advanced find view for providing the record selection to be plotted on the map.

Preview:

Here clicking on Get Direction one can see the following screen.

Click here to check further details.