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 rajeevpentyala@live.com

  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 = Xrm.Page.data.entity.attributes.get(“telephone1”);
    var regExp= /^[0-9]\d{2,4}-\d{6,8}$/;

    if (telephone) {
    var phoneNumber = telephone.getValue();
    if (phoneNumber.search(regExp) == -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 Dynamics101.com, 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 http://www.dynamics101.com/2014/09/top-25-dynamics-crm-sites/, 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
    http://www.dynamics101.com | @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?

  13. KK
    November 9, 2019 at 12:53 AM

    Hi Rajeev,
    could please write about Actions in D365 ?
    How to start with Actions and step by step procedure to work?

    Thanks in Advance.

  14. Haji Gulla
    February 5, 2020 at 8:20 AM

    Hi Rajeev,

    While creating Calendar Meeting Request through plugin in CRM we are getting “Unable to connect Remote Server issue”.
    1)even though from mail id is administrator user
    2) even though current context user for below code is also administrator user
    SmtpClient smtp = new SmtpClient(SMTPServerName, 25); //same SMTP server using to send mails on behalf CRM administrator user but not issue not with normal mail issue with calendar meeting request.

    smtp.Port = 25;
    smtp.Host = SMTPServerName;
    smtp.EnableSsl = false;
    smtp.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; //Getting issue here unable to connect remote server.

    Please help me out this issue. If required I will provide more information about issue.

  15. June 1, 2020 at 3:50 PM

    Hi Rajeev,

    Today, I came across a situation as part my requirement. I am working a Power App (Model Driven). I have a form on which i have a text filed. I have added on Canvas App to that Text filed control and provided appropriate Entitiy Name, App Name & AppID.

    This works fine and all Good.

    Now it is time to move the solutions to Other environment. where I have one more Canvas App which is pointing to that environment.

    When I move my solution from Source to Target environment the Text filed control was pointed to Source Environment Canvas App only which is Expected behavior in D365.

    Now i need to point to the Right Canvas App on that environment? Is there anyway to automate that so that every time I should not go to Form control properties and then update the appropriate Canvas app details related to that environment.

    FYI: I am using Unmanaged solution for now.

    Thank you,

    • June 3, 2020 at 8:22 PM

      There is no clean way yet to manage embedded Canvas app porting between instances. Will share the approach we follow in the response to your email.

  16. Raghav
    June 23, 2020 at 4:45 PM

    Hi Rajeev,

    Your blogs for MS CRM D365 are really helpful to us!
    Can you help me in providing a sample Web API code for CRUD operations and to fetch records from multiple tables in one API call for On-Premise D365 CRM?


  17. LittleRose
    January 5, 2022 at 9:48 AM

    Hi Rajeev,

    i am trying to upload a file/picture in a canvas app though creating a submit button then storing that file into Azure Blob storage and then saving the URL in dataverse so I can retreive it when needed to reference that file. Can you please help me do that

  18. Mariya
    February 23, 2022 at 12:37 PM

    i create email with adding template now i have to add name of the students by dynamically so how to get template body

  19. Piyush Parihar
    January 2, 2023 at 4:17 PM

    Hi Rajeev,We are getting this PFE issue on our plugin code”Replace retrieval of primary entity with a pre/post image snapshot registration.”.We are not using any service.Retrieve on primary entity but still it is showing this message.Could you please guide me why PFE recommending this?
    Thanks in advance.

    • February 17, 2023 at 3:24 PM

      Hi Piyush, I can’t jump to conclusion without checking the code and PFE report. If you are sure you dont have any Retrieve/RetrieveMultiple/Execute using Query Expression, its a strange issue.
      Also I recommend to run ‘Solution Checker’ against your solution from Power Apps maker portal and consider those findings.

  20. Manoj Bora
    February 16, 2023 at 4:12 PM

    Hi Rajeev,
    Hope you are well.
    I am new to D365 AND PP as i have switched careers from hospitality. Currently working in support and trying to learn as much as possible.
    One issue which I cannot find answer is one of my client is creating a case in portals which is tracked in Customer service and when I pick up that case and try to send an email (just simple text as TEST), when we check back in portal comments, it shows as scrabled text like front end script language.
    Only this particular person from the client organisation can replicate this scenario, none of his collegue or us at the support can replicate it.
    Just looking for any pointers as could not find any helpgul blog.
    Many Thanks in Adnvance,

  1. July 30, 2020 at 12:52 AM

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: