Views:

Scenario Overview

In this business scenario the customer wants a record type to have a Case ID that populates on the creation of the record. They want the Case ID to be:

  • Random
  • 7 digits
  • In integer form
  • Be a unique number 

North52 Decision Suite Steps

The following set of steps outline how to create this Formula:

  • A formula of type Auto Number is created on the Case entity:
  • The Event is set to 'Create'
  • The Auto No. Value is set to '1234567'
  • The Source Entity is set to 'Case'
  • The Source Property is set to 'Case Number'
  • The Target Entity is set to 'Case'
  • The Target Property is set to 'Case Number'
  • Copy and paste the formula provided below into the formula editor 
  • Click Save
  • It is now ready to test 

Formula

SmartFlow(
   
   SetVar('UniqueNo', 
          ToString( AutoNumber([incident.ticketnumber]+1))
        ),
  

    SmartFlowReturn( Substring(GetVar('UniqueNo'), 6, 1) +
                  Substring(GetVar('UniqueNo'), 4, 1) +
                  Substring(GetVar('UniqueNo'), 2, 1) +
                  Substring(GetVar('UniqueNo'), 0, 1) +
                  Substring(GetVar('UniqueNo'), 1, 1) +
                  Substring(GetVar('UniqueNo'), 3, 1) +
                  Substring(GetVar('UniqueNo'), 5, 1) 
           )

)

Did you know?

North52 has a powerful distributed cache for advanced decision logic

xCache allows you to configure and scale your Dynamics 365/CRM applications running On-Premise or Online. It allows dynamic system configuration and removes performance bottlenecks related to data storage. xCache provides Dynamics 365/CRM with an extremely fast and scalable distributed cache to power your advanced decision logic.

xCache in Dynamics CRM  lets you cache static application data, and also load dynamic cache items for applications running in a single or multi-server configuration.

Learn more and see examples of xCache