You need to sign in to do that
Don't have an account?
Salesforce Blitz
get record name from record id
How do i need to fetch record name from record id in salesforce
Thanks
Laxman
Thanks
Laxman
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
You can do a simple query and get all the details of the record if you have id.
Ex:
thanks!
Hi Laxman,
Use this query-: Recommend link-http://salesforce.stackexchange.com/questions/5072/how-to-get-record-name-passing-object-name-record-id-dynamically
Thanks
Rupal Kumar
http://mirketa.com
Forgt to mention,..
I need to get the name without using any SQOL
Thanks
I have a list of ids in sa controller method.
I need to get the names of the record and display them..
Thanks
Try this
then use the cList to display.
alternatively if you are just using a list view you can check this link.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_list_views.htm
<apex:form >
<apex:pageBlock title="Search Account Record's Id based on Name and Vice-Versa">
<apex:pageBlockSection >
<apex:inputText label="Input" value="{!Text}"/>
<apex:commandButton value="Search" action="{!GetResult}"/>
<apex:outputText label="Output" value="{!Output}">
</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
----------------------------
public class accountdef
{
public string Text{get;set;}
public string output{get;set;}
public Void GetResult()
{
if(Text!=null && Text!='')
{
Account Acc=[select id,name from Account where id=:Text or name=:Text];
if(Text==acc.name)
{
Output=acc.id;
}
else
{
Output=acc.name;
}
}
}
}
Hi Laxman,
I am writing a code that will help you
select id,name form object name where id=:recordid
Hope it helps.