Wednesday, July 14, 2021

How to search in multiple table from a lookup in Dynamic CRM

Now we can use a single lookup field to refer multiple entities for searching (including a custom entity)

A lookup value submitted will be matched to a record in all the related entities.

Note: For now, to achieve this it is possible only via SDK or Web APIs. Interactive user interface support will be coming in a future release. 

Example:

Let's say you are hosting media for users in a library. You have many different MediaObjects, like “Books”, “Audio”, and “Video”. Creating a multi-table lookup called “new_Media” that has 1:M relationships to “new_Books”, “new_Audio”, and “new_Video” will result in a “new_Media” lookup table that provides quick identifications of records stored in specific tables.

 



Shown below is an HTTP post to CREATE Multiple lookup attribute.

It will create three relationships as depicted below image.


POST [Organization URI]/api/data/v9.0/CreatePolymorphicLookupAttribute HTTP/1.1 

 

Accept: application/json 

Content-Type: application/json; charset=utf-8 

OData-MaxVersion: 4.0 

OData-Version: 4.0 

 

{

 "OneToManyRelationships": [

   {

     "SchemaName""new_media_new_book",

     "ReferencedEntity""new_book",

     "ReferencingEntity""new_media"

   },

   {

     "SchemaName""new_media_new_video",

     "ReferencedEntity""new_video",

     "ReferencingEntity""new_media"

   },

   {

     "SchemaName""new_media_new_audio",

     "ReferencedEntity""new_audio",

     "ReferencingEntity""new_media",

     "CascadeConfiguration": {  

        "Assign""NoCascade",  

        "Delete""RemoveLink",  

        "Merge""NoCascade",  

        "Reparent""NoCascade",  

        "Share""NoCascade",  

        "Unshare""NoCascade"  

     }

   }

 ],

 

 "Lookup": {

   "AttributeType""Lookup",

   "AttributeTypeName": {

     "Value""LookupType"

   },

 

   "Description": {

     "@odata.type""Microsoft.Dynamics.CRM.Label",

     "LocalizedLabels": [

       {

         "@odata.type""Microsoft.Dynamics.CRM.LocalizedLabel",

         "Label""Media Polymorphic Lookup",

         "LanguageCode": 1033

       }

     ],

 

     "UserLocalizedLabel": {

       "@odata.type""Microsoft.Dynamics.CRM.LocalizedLabel",

       "Label"" Media Polymorphic Lookup Attribute",

       "LanguageCode": 1033

     }

   },

 

   "DisplayName": {

     "@odata.type""Microsoft.Dynamics.CRM.Label",

     "LocalizedLabels": [

       {

         "@odata.type""Microsoft.Dynamics.CRM.LocalizedLabel",

         "Label""MediaPolymorphicLookup",

         "LanguageCode": 1033

       }

     ],

 

     "UserLocalizedLabel": {

       "@odata.type""Microsoft.Dynamics.CRM.LocalizedLabel",

       "Label""MediaPolymorphicLookup",

       "LanguageCode": 1033

     }

   },

 

   "SchemaName""new_mediaPolymporphicLookup",

   "@odata.type""Microsoft.Dynamics.CRM.ComplexLookupAttributeMetadata"

 }

}



Add new relationship to existing Multiple-lookup

POST [OrganizationUrl]/api/data/v9.0/RelationshipDefinitions

{

  "SchemaName": "new_media_poly_new_newspaper",

  "@odata.type": "Microsoft.Dynamics.CRM.OneToManyRelationshipMetadata",

  "CascadeConfiguration": {

    "Assign": "NoCascade",

    "Delete": "RemoveLink",

    "Merge": "NoCascade",

    "Reparent": "NoCascade",

    "Share": "NoCascade",

    "Unshare": "NoCascade"

  },

  "ReferencedEntity": "new_newspaper",

  "ReferencingEntity": "new_media",

  "Lookup": {

    "AttributeType": "Lookup",

    "AttributeTypeName": {

      "Value": "LookupType"

    },

    "Description": {

      "@odata.type": "Microsoft.Dynamics.CRM.Label",

      "LocalizedLabels": [

        {

          "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel",

          "Label": "Media Polymorphic Lookup",

          "LanguageCode": 1033

        }

      ],

      "UserLocalizedLabel": {

        "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel",

        "Label": "Media Polymorphic Lookup Attribute",

        "LanguageCode": 1033

      }

    },

    "DisplayName": {

      "@odata.type": "Microsoft.Dynamics.CRM.Label",

      "LocalizedLabels": [

        {

          "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel",

          "Label": "MediaPolymorphicLookup",

          "LanguageCode": 1033

        }

      ],

      "UserLocalizedLabel": {

        "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel",

        "Label": "MediaPolymorphicLookup",

        "LanguageCode": 1033

      }

    },

    "SchemaName": "new_mediaPolymporphicLookup",

    "@odata.type": "Microsoft.Dynamics.CRM.LookupAttributeMetadata"

  }

}


Finally, we can see all entities in lookup





References

https://powerapps.microsoft.com/en-us/blog/announcement-multi-table-lookups-are-now-available-as-a-preview/

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/multitable-lookup?branch=pr-en-us-4448


Wednesday, July 7, 2021

How to search lookup based on other attribute in Dynamic CRM

 Using the lookup, we can search records by typing in the search keywords to filter the list.

This search is performed on all fields that are listed in the Find columns in the Quick Find View of the entity.

Below are the steps in Power Apps or UCI Settings.

1] Navigate to the respective entity and click on views and edit Quick Find view for that entity.

2] Edit find table columns and select the columns that are required for search.




Here is the same we can achieve in Classic mode as well.

1] Navigate to the respective entity and click on views and edit Quick Find view for that entity.

















How to stop showing recent records for lookup fields in UCI

When using lookup fields on the form, it by default shows the recent records in the UCI environment. We need to hide the recent records for the lookup fields.

 

Solution

We need to change the field behavior settings.

1] UCI Form Settings

Check the Disable most recently used items and then save and publish the form customization changes.


2] Classic Editor Form Settings

If your recent items are still showing up, try to use classic editor and turn on or checked the field behavior setting as depicted in below image.









Monday, July 5, 2021

Generic Method to Hide and Show Tab and Section

 

Problem Statement

We need to hide and display TAB’s and their respective SECTION's based on configured values. 

The configuration will be loaded based on the template selected for a given entity records.


Solution

As current D365 CRM does not support any out-of-box feature to support this, we created a generic script-based solution to support our scenario.

Note: We cannot show hide sections/tab using Business rules.


Template Configuration

We created a configuration entity which can be used by the End-Client to configure which TAB and SECTION to show.

Tab and Section are created as a Multi-Select for user to decide and configure which section and tab to be displayed.




Configuration Rules
When NO Section Name is listed for a given TAB, by default script should display all the sections for it.

But When Section Name is specified, it will display only those sections for a respective TAB.


Please reach out to me for detailed script and solution.

 

Thanks.

Vipin Jaiswal

vipinjaiswal12@gmail.com




How to hide a section in MS CRM 2016 based on user logged in ?

https://vjcity.blogspot.com/2016/09/how-to-hide-section-in-ms-crm-2016.html

 

Sunday, May 9, 2021

Basic terminology in Dynamic CRM

Sales processes typically map to specific types of records that are often used with working with sales automation software. It is important to understand key terminology used in sales and with sales process automation software.

The list below provides definitions for commonly used sales terms and selling components:


Term

Definition

Account

An account represents a business or organization. Sometimes this organization is a customer or a vendor. In some organizations, it might be a different grouping, such as a family. Typically, an account will have related contact records.

Activities

An activity represents supporting records and customer interactions. By default, the system will have activities such as email, appointment, and phone call already configured. Other custom activities meet extra needs of the business.

Contact

A contact represents a single individual. A contact will often have many related records such as an account and activities.

Customer

A customer can be either an account or a contact. Typically speaking, in a business-to-business scenario, this is an account. In a business to consumer scenario, this is a contact.

Lead

A lead represents someone with an interest in what you are selling. A lead might be an existing client, or someone that you have never done business with before.

Opportunity

Like a lead, an opportunity is a potential sales transaction. Typically, an opportunity is a more viable prospect than a lead, and it will contain more information and be tracked for a longer period of time.

Product Catalog

A collection of records that interact with opportunities, quotes, orders, and invoices to facilitate management of products, price lists, discounts, and product families for sales transactions.

Quote

A formal offer for products or services, proposed at specific prices and related payment terms to a customer.

Order

A confirmed request for delivery of goods and services based on specified terms, or a quote that has been accepted by a customer.

Invoice

An order or record of a sale including details about products or services purchased that has been billed to the customer.

Sales Pipeline

A sales pipeline is a snapshot of where prospects are in the sales process. A typical pipeline would show how many deals salespeople are expected to close in a given week, month, or year, and how close a rep is to reaching their sales quota.

Competitors

Competitors are organizations that you are competing with to win deals.


The image below shows an example what a sales lifecycle might look like from beginning to end:


In the image above, we can see a potential customer has contacted our organization expressing an interest in our products and services. They are captured and entered as a lead.

  • Qualify: An account executive reaches out to the lead to gather more information about them and determine if a relationship would be mutually beneficial.

    • If it is determined that it is not a good fit, the lead is disqualified and the sales cycle ends.

    • If it is determined that everyone is a good fit, the lead is qualified and converted to an opportunity.

  • Develop: The opportunity record is used to develop the details of the deal. Details such as the products and services they are interested in, estimated revenue, and time-lines are added to the opportunity.

  • Propose: Once the deal is ready, a quote is added to the opportunity that represents the formal proposal to the customer.

  • Close: When the customer agrees to the quote, an order is generated. The quote and opportunity associated with the order are closed.

  • Fulfill: After the order is fulfilled, an invoice is generated to bill the customer.

To help manage the sales lifecycle, organizations often use salesforce automation software. Modern sales automation software not only helps guide and automate the selling process, but they provide tools to enhance the digital selling experience and build long lasting relationships with customers.