About Me

Hello thanks for dropping by.

I am Rajeev Pentyala, A Master’s Degree holder in computer applications from India and a Certified Microsoft Professional.

I have been working on Microsoft technologies such as Dynamics 365 CE, Dynamics CRM, Dynamics Portals, Power Platform, USD, ADX, ASP.Net, C#.Net, SSRS and SSIS.

Please do share your feedback and suggestions. Happy learning 🙂

I can be reached at

  1. Nisha
    February 27, 2012 at 12:37 PM

    Hi Rajeev,

    I need to format the Mobile number for 10 digit as 023-1314151 in CRM 2011.

    I have called the below function in CRM Form field name “new_mobilenumber” On OnChange Event by giving the Function “OnPhoneFieldChange(new_mobilenumber)”.

    function OnPhoneFieldChange(new_mobilenumber)
    var value = new_mobilenumber.getEventSource().getValue();
    if (typeof(value) != “undefined” && value != null)
    value = formatPhoneNumber(value);

    function formatPhoneNumber(inputValue) {
    var scrubbed = inputValue.toString().replace(/[^0-9]/g, “”);

    var tenDigitFormat = /^\(?([0-9]{3})[-. ]?([0-9]{7})$/;

    if (tenDigitFormat.test(scrubbed))
    return scrubbed.replace(tenDigitFormat, “$1-$2″);

    return inputValue;

    But its not working. can u guide and help me where did i go wrong. after add this web resources in CRM form is Error .

  2. February 27, 2012 at 6:11 PM


    Below logic should work.

    1) Create a new .jscript file with below method
    2) Add as webresource
    3) Register the method on the “onchange” event of field

    function businessPhoneOnChange() {
    var telephone =“telephone1”);
    var regExp= /^[0-9]\d{2,4}-\d{6,8}$/;

    if (telephone) {
    var phoneNumber = telephone.getValue();
    if ( == -1) {
    alert(“Invalid Phone number”);

    – Let me know if u face any issues

  3. Nisha
    February 28, 2012 at 8:25 AM

    I try using the code you given.After adding it in to the Event of field the entity form is error.
    Correct me if im wrong while adding the Function name in the event handler of the field should be “businessPhoneOnChange()”. Im new to CRM. Just 2 weeks im using.I have try 3 various code for this logic but the function is not executed properly. please can u guide on tht..

  4. Jaques
    March 7, 2012 at 3:55 PM

    I am trying to set State of Lead record, CRM2011, it does not work..

    Do you know if this code works for Lead, it seems to work for Accounts.

    • April 9, 2014 at 9:45 AM


      Can u try this code.

      Guid leadId = new Guid(“D020F344-A470-E111-B9DA-00155D04DC01”);

      SetStateRequest request = new SetStateRequest
      EntityMoniker = new EntityReference(“lead”, leadId),
      State = new OptionSetValue(2),
      Status = new OptionSetValue(6)


  5. Missy
    April 3, 2014 at 1:42 AM

    CRM 2011 – I need to display the modified “out of box” leads, opportunity and marketing entity under the WORKPLACE. I am told I can only use the SITEMAP (export, edit, import) method. I exported and made a copy of the site map; the zipped sitemap file has three xml files – contact types, customizations & solutions. I assume I open the customizations? Then, option is to OPEN as XML excel table, but I am not sure where to modify on the xml? Is there a more simple method to get these entities (GUI) or is this the only way and if so, can you help provide a bit more clarification where I modify this?

  6. October 30, 2014 at 5:10 AM

    Hey Rajeev,

    I hope you are doing well. My name is Samuel and I’m the Managing Editor of, a recently launched training site for Microsoft Dynamics products.

    I just wanted to let you know that after careful consideration we have decided to include your blog in our first annual list of Top 25 Dynamics CRM Sites.

    I’ve mentioned your blog here, and we’ve created a badge that you could showcase on your site if you like.

    Either way, thanks for creating such a great blog! Keep up the good work.

    Samuel Harper | Managing Editor | @Dynamics_101

    • October 30, 2014 at 11:14 AM

      Thanks Samuel.
      I am so happy to see my blog next to the great bloggers whom I emulate.

  7. Krish
    March 31, 2015 at 3:00 PM

    Hi Rajeev, your blog is really helpful for beginners like me in MS Dynamics CRM World. Do you have any idea on How to roll-up accounts’s Activities (including child accounts) into a custom entity’s Activities tab available in social pane(Posts, activities & Notes). Custom entity has 1:N relationship with Accounts. I’m thinking of writing a ActivityPointer MutipleRetrieve plugin to filter down the required activities. To do this I’m not sure of how to get hold of the Parent form’s entity id (i.e. custom entity) and then the list of Accounts id (1:N relationship to custom enity), please throw some lights. The social pane is in custom entities form and the accounts are brought into custom entities form through sub grid (1:N relationship).

    • April 1, 2015 at 5:23 PM

      Hi Krish,
      Roll-up using Plug-ins is little tedious. How about below approach
      * Design a HTML web resource with Custom grid (JQGrid) and fetch all the Account roll-up activities.

  8. krish
    April 1, 2015 at 6:56 PM

    Many thanks for the reply Rajeev. I thought about the HTML option, but the users will have to activities list one from the social pane and another custom activities list. Mainly, the social pane is really looking good, but I’m not sure whether we can amend it to include the roll up activities.

  9. chandrasekaran
    April 20, 2015 at 3:58 PM


    While plugin Registration, we have 3 options.



    Post operation.

    Could you please tell me that when will use Pre-validation,

    when will use Pre-operation,

    when will use Post operation?

    kindly explain it with simple any scenario

  10. prachi
    July 8, 2017 at 5:15 PM

    Hello sir,I am new to Dyanmic 365 Plugin World ,can u guide me with a plugin of creating a record in an entity properly

  11. November 1, 2017 at 1:02 PM

    hi , i followed your USD blog to create inbound phonecall activity , i am unable to do it and how can i debug it .

  12. March 27, 2019 at 10:57 PM

    I was just hoping you could help me. I have deployment of uci integrated to ms dynamics and by using USD. I am encountering problem with transfer. Ani being get by agent2 is agent1 ANI instead of the caller ANI. Is this USD configuration issue?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: