You need to sign in to do that
Don't have an account?
test batch
Why record type name is not able to display in vf page
public ShowallTimeCatdsCtrl2(ApexPages.StandardController controller) { string invoiceid = ApexPages.currentPage().getParameters().get('id') ; system.debug('emailinvoice' + EmailInvoice); selectedtimecards = new List<Wrapclass>(); selectedtimecards1 = new List<Wrapclass>(); diselectedtimecards = new List<Wrapclass>(); selectedtimecardsWrpr = new List<TimeCardWrapClass> (); mainPageWrap = new List<MainWrap>(); wrap = new Map<string, List<Wrapclass>>(); wrap1 = new List<Wrapclass>(); empAmount = new map<string,decimal> (); clpAggList = new List<AggregateResult>(); totalbool = true; tc = new Timecard__c(); //invoiceId= new List<Id>(); timeCardIds = new Set<Id>(); payments = 0.00; downlodPdf = false; defalval = true; defalttotalbool = false; isEmptyEmail = false; //JS if(String.isNotBlank(invoiceid)) { objInvoices = [ SELECT Id, Name, Account__c,Account__r.Accounts_Payable_Email__c, Amount__c, Check_No__c, Comments__c, Cross_Checked_Approved__c, Date_Paid__c, Due_Date__c, Ext_Id__c, Payment_Mode__c, RecordType.Name, Project__c, Service_Term_From__c, Service_Term_To__c, Status__c, Sub_Contractor_Employee__c, Today__c FROM Invoice__c WHERE Id = :invoiceid]; acdate = objInvoices.Service_Term_From__c; dcdate = objInvoices.Service_Term_To__c; } else { objInvoices = new Invoice__c(); } mailString=objInvoices.Account__r.Accounts_Payable_Email__c;//list of account mail ids. recordTypeId = ApexPages.currentPage().getParameters().get('RecordType'); try { recordTypename = [ SELECT id, name FROM RecordType WHERE SobjectType ='Invoice__c' AND Id = :recordTypeId LIMIT 1 ].name; } catch(Exception e) { System.debug('Exception occurred while querying for RecordType : ' + e.getMessage()); } } ========================vf================ <apex:outputText value="{!callfunc}" escape="false"></apex:outputText> <apex:actionFunction name="calculateData" action="{!calculateData}" reRender="rrp,otpl,gtp1,txt,tpanl,messages"/> <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId') " style="display:none;" /> <apex:pageBlock title="Invoices" id="invoices"> <apex:pageMessages id="messages"/> <apex:pageblocksection > <apex:inputField value="{!objInvoices.Account__c}"/> <apex:pageBlockSectionItem > RecordType Name <!-- <apex:outputText value="Auto Invoice"/>--> <apex:outputText value="{!RecordtypeName}" style="color:red;font-weight: bold;"/> </apex:pageBlockSectionItem> </apex:pageblocksection> <apex:pageblockSection > <apex:inputField value="{!objInvoices.Status__c}"/> </apex:pageblockSection> <apex:pageblockSection > <apex:inputField value="{!objInvoices.Cross_Checked_Approved__c}"/> <apex:inputField value="{!objInvoices.Project__c}"/> </apex:pageblockSection> <apex:pageblockSection > <apex:inputField value="{!objInvoices.Service_Term_From__c}"/> </apex:pageblockSection>
public String RecordtypeName {get;set;}
That should work !
Kindly mark it as an answer if that resolves your query.
Thanks Akhil,
But Why <apex:outputText value="{!objectinvoices.Recordtype.Name}" style="color:red;font-weight: bold;"/> is not working.?