0

I have a lwc table where I have created buttons. I am using a url inside the href attribute and it is redirecting me to a other page as expected but I need to append the recordId with url inside href, so that correct recordId should be visible . I am trying to append the recordId but the recordId is not showing.

The expected url should this :- /i-need-a-broker/?BrokerId=001Da00000xln40IAA.

But I getting this :- /i-need-a-broker?BrokerId=%7B!acc.Id%7D

accountId = {acc.Id} Contact Broker

View Details

2
  • Welcome to Stack Overflow! It looks like you have an object called acc with an Id property, and you want to include the value of the Id property in the URL as the value of the BrokerId parameter? Whereas what's actually happening is that {acc.Id} is being included in the URL as a literal string, and has been percent encoded because { and } are not valid characters in a URL. Is this JavaScript code? If so, please edit the question to show the code which is building the URL. Commented Jul 10, 2024 at 17:15
  • You may also want to read stackoverflow.com/help/minimal-reproducible-example and stackoverflow.com/help/formatting Commented Jul 10, 2024 at 17:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.