Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Customer Voice forum / Pass variable values i...
Customer Voice forum
Suggested answer

Pass variable values in URL

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.

Categories:
  • SwertresResult Profile Picture
    SwertresResult 2 on at
    Pass variable values in URL

    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.

  • Suggested answer
    AN-22040756-0 Profile Picture
    AN-22040756-0 7 on at
    RE: Pass variable values in URL

    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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans