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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Pass variable values in URL

(1) ShareShare
ReportReport
Posted on by 7

I have a custom button on a dynamics 365 page which launches a customer voice survey.

I need the ability to pass the record guid into a variable so that once responded to, I can capture the initial record where the survey was launched from.

Thank you for any help with this.

I have the same question (0)
  • Suggested answer
    AN-22040756-0 Profile Picture
    7 on at

    Found the answer.

    The short URL that is copied from customer voice doesn't work.

    Instead use this URL

    https://forms.office.com/FormsPro/Pages/ResponsePage.aspx?id=

    followed by the ID of the form and then

    &ctx={"SessionID":"1234","recordtype":"opportunity"}

    replacing the variable names with your own.

  • SwertresResult Profile Picture
    2 on at

    When passing variable values in a URL, you typically use query parameters. Query parameters are key-value pairs added to the end of a URL after a question mark (?). Each parameter is separated by an ampersand (&). Here's an example of how you can pass variable values in a URL:

     
    arduino
    https://example.com/page?variable1=value1&variable2=value2

    In this example, the URL https://example.com/page is followed by a question mark (?), and then the query parameters variable1=value1 and variable2=value2 are added. You can include as many query parameters as needed by separating them with ampersands.

    When constructing a URL with variable values, you should ensure that the values are properly encoded to avoid any issues with special characters or reserved characters. URL encoding replaces special characters with percent-encoded representations, making the URL safe to use.

    Here's an example of a URL with properly encoded variable values:

    https://example.com/page?name=John%20Doe&age=30

    In this case, the space in the name "John Doe" is replaced with %20, the percent-encoded representation for a space character.

    On the server side, when processing the URL, you can retrieve the variable values using the appropriate programming language or framework. The specific method will depend on the technology you're using. For example, in JavaScript, you can access the variable values using the URLSearchParams object or by parsing the URL manually.

    Remember to exercise caution when passing sensitive or private information in the URL, as URLs can be logged and stored in various places, potentially compromising the security of the data.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans