I am getting record id from Browser URL and I got the Object name using record ID. now I want to fetch the record name using record id.
I used dynamic query to fetch name using record id but I am getting error can anyone help to solve my issue.
Browser URL: https://ap1.salesforce.com/500900000070l0d
Record ID: 500900000070l0d
I fetched object name: Match =case
string qr = 'select id, CaseNumber from '+match+' where id=:'+BrowserURLId;
Error : I unexpected token: '500900000070l'
Can anyone please help where I did mistake or any other way to get record name using Object name and ID pass dynamically.