web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Concatenate string and field and update another field

(1) ShareShare
ReportReport
Posted on by

Hi,

I have a custom entity that needs to hold a URL to a pdf document in sharepoint.
The entity has a field that holds the document name that is used in the path.

The URL will be created in the following format: "sharepoint path/" + [Custom Entity Field] + ".PDF"

Can this be done by using a business process flow or do I need a plugin for this type of thing?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,778 Super User 2025 Season 2 on at

    Sounds to me like a calculated text field will get you exactly what you need. Go to the entity, and create a new field:

    Data Type - Single Line of Text

    Field Type - Calculated

    Format - URL

    On the Calculated field menu, you can build your URL piece by piece.

    Field = CONCAT(<sharepoint path>, <Document Name>, ".PDF")

    That should build it out for you just fine. You can use values from fields on the entity, or by typing in a manual value (like ".PDF") to build the string. Make sure your manually entered string is in quotes.

    calculated-URL.PNG

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hello,

    As suggested above calculated field will be the best options for you. You don't need to write any code , just to make sure you are concatenate correct fields.

    Check here for more details -

    crmramblingsbysteven.wordpress.com/.../microsoft-crm-2015-how-do-i-concatenate-two-fields-in-microsoft-crm-2015-revised

  • Verified answer
    Community Member Profile Picture
    on at

    This can be achieve in multiple ways so you can choose what fits your need best. You can use the workflows to set the desired field value. In the example below I created a sync workflow which is fired when the account record is created or the account name is updated and used that to populate the website field using slugs and string concatenation.

    3324.WorkFlow.png

    This will update the account field on the server whenever the account name is updated or new account is created. This will trigger on data import and SDK endpoints too. However on the client the change is not immediately visible .

    In order to achieve that you can use client API to do the same on the client. See example here - https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/clientapi-form-context

    In short on change on the account name -> get the field value and set the desired field after decorating with the sharepoint substrings.

     

  • Suggested answer
    monty270311 Profile Picture
    on at

    Thanks! That makes perfect sense.

  • yleclerc Profile Picture
    1,549 on at

    Very nice post. Quick question though. What if the string I need to concatenate has double quotes in it? How can I isolate those?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans