• Shweta Rai
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Hi,

I want to dislay the Validation error message on the VF Page code. How do i o that?

 validation rule:

Case.ownerID=RecordApproverMapping.ID

Error Message: Not Allowed



And this VF page

<apex:page standardController="Case" extensions="CaseSelectController" id="pageId" title="Case Approver">
    <apex:form id="formId">
        <apex:pageMessages id="pageMessagesId"/>
        <apex:inputHidden value="{!Case.LOB__c}"/>
        <apex:inputHidden value="{!Case.Sub_LOB_Asset_Class__c}"/>
        
        <apex:pageblock title="Case: {!Case.CaseNumber}" id="pageBlockSearchId">
            <apex:pageBlockButtons location="top" id="pageBlockButtonsId">
                <apex:commandButton action="{!SearchApprover}" value="Search" id="commandButtonSearchId" reRender="pageMessagesId,outputPanelId"/>
                <apex:commandButton action="{!Cancel}" value="Cancel" id="commandButtonCancelId"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection >
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Search Approver"/>
                    <apex:inputText value="{!searchNameString}"/>
                </apex:pageBlockSectionItem>
                
            </apex:pageBlockSection>
        </apex:pageblock>
        
             
        
        
        <apex:outputPanel id="outputPanelId">
            <apex:pageBlock title="List pre-filtered by DOA" id="pageBlockRecordId" rendered="{!if(RecordApproverMappingList != null && RecordApproverMappingList.size>0,true,false)}">
                <apex:pageblockTable value="{!RecordApproverMappingList}" var="cAML" id="pageblockTableId">
                    <apex:column headerValue="Record Approver Name">
                        <apex:commandLink value="{!cAML.Name}" action="{!selectApproverRecord}">
                            <apex:param name="selectedApproverId" value="{!cAML.Id}" assignTo="{!selectedApproverId}"/>
                        </apex:commandLink>
                    </apex:column>
                    <apex:repeat value="{!FieldSetMemberList}" var="f">
                        <apex:column value="{!cAML[f.fieldPath]}"/>
                    </apex:repeat>
                </apex:pageblockTable>
                <apex:panelGrid columns="4" id="panelGrid">
                    <apex:commandLink action="{!first}" rendered="{!hasPrevious}" rerender="outputPanelId,panelGrid">First</apex:commandlink>
                    <apex:commandLink action="{!previous}" rendered="{!hasPrevious}" rerender="outputPanelId,panelGrid">Previous</apex:commandlink>
                    <apex:commandLink action="{!next}" rendered="{!hasNext}" rerender="outputPanelId,panelGrid">Next</apex:commandlink>
                    <apex:commandLink action="{!last}" rendered="{!hasNext}" rerender="outputPanelId,panelGrid">Last</apex:commandlink>
                </apex:panelGrid>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>


Please let me know how can I inlcude the error message on VF Page?

thanks,
Shweta
Hi,

I have created a Custom Account VF page i.e.overrride the standard page. I am using below code to shows Account History on VF page. but the history is not sorted, how can I sort he history by CreatedDate?


<apex:pageBlock title="Account History" id="Account_History"> <apex:pageBlockTable value="{!account.hist}" var="accounthistory" rows="100"> <apex:column value="{!accounthistory.createddate}"/>
<apex:column value="{!accounthistory.createdby.name}"/>
<apex:column value="{!accountHistory.field}"/>
<apex:column value="{!accounthistory.oldvalue}"/>
<apex:column value="{!accounthistory.newvalue}"/>
</apex:pageBlockTable> </apex:pageBlock>


Thanks!
Hi,

I am really new to Salesforce and seeking your help to develop the bewlo idea. In my org, we are using Document to store the files. Document has a folder "Sales Tools". I want whenever users click on the "View" or "the document link" a custom message should pop- up and when user click Ok he should be able to see the document . Below is the screenshot to give more idea of what i am referring to.
User-added image

Please let me know how can i create a custom popu- message whenever i click on "View" or "Document Link"

Thanks a lot.
 
Hi,

I want to dislay the Validation error message on the VF Page code. How do i o that?

 validation rule:

Case.ownerID=RecordApproverMapping.ID

Error Message: Not Allowed



And this VF page

<apex:page standardController="Case" extensions="CaseSelectController" id="pageId" title="Case Approver">
    <apex:form id="formId">
        <apex:pageMessages id="pageMessagesId"/>
        <apex:inputHidden value="{!Case.LOB__c}"/>
        <apex:inputHidden value="{!Case.Sub_LOB_Asset_Class__c}"/>
        
        <apex:pageblock title="Case: {!Case.CaseNumber}" id="pageBlockSearchId">
            <apex:pageBlockButtons location="top" id="pageBlockButtonsId">
                <apex:commandButton action="{!SearchApprover}" value="Search" id="commandButtonSearchId" reRender="pageMessagesId,outputPanelId"/>
                <apex:commandButton action="{!Cancel}" value="Cancel" id="commandButtonCancelId"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection >
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Search Approver"/>
                    <apex:inputText value="{!searchNameString}"/>
                </apex:pageBlockSectionItem>
                
            </apex:pageBlockSection>
        </apex:pageblock>
        
             
        
        
        <apex:outputPanel id="outputPanelId">
            <apex:pageBlock title="List pre-filtered by DOA" id="pageBlockRecordId" rendered="{!if(RecordApproverMappingList != null && RecordApproverMappingList.size>0,true,false)}">
                <apex:pageblockTable value="{!RecordApproverMappingList}" var="cAML" id="pageblockTableId">
                    <apex:column headerValue="Record Approver Name">
                        <apex:commandLink value="{!cAML.Name}" action="{!selectApproverRecord}">
                            <apex:param name="selectedApproverId" value="{!cAML.Id}" assignTo="{!selectedApproverId}"/>
                        </apex:commandLink>
                    </apex:column>
                    <apex:repeat value="{!FieldSetMemberList}" var="f">
                        <apex:column value="{!cAML[f.fieldPath]}"/>
                    </apex:repeat>
                </apex:pageblockTable>
                <apex:panelGrid columns="4" id="panelGrid">
                    <apex:commandLink action="{!first}" rendered="{!hasPrevious}" rerender="outputPanelId,panelGrid">First</apex:commandlink>
                    <apex:commandLink action="{!previous}" rendered="{!hasPrevious}" rerender="outputPanelId,panelGrid">Previous</apex:commandlink>
                    <apex:commandLink action="{!next}" rendered="{!hasNext}" rerender="outputPanelId,panelGrid">Next</apex:commandlink>
                    <apex:commandLink action="{!last}" rendered="{!hasNext}" rerender="outputPanelId,panelGrid">Last</apex:commandlink>
                </apex:panelGrid>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>


Please let me know how can I inlcude the error message on VF Page?

thanks,
Shweta
Hi,

I have created a Custom Account VF page i.e.overrride the standard page. I am using below code to shows Account History on VF page. but the history is not sorted, how can I sort he history by CreatedDate?


<apex:pageBlock title="Account History" id="Account_History"> <apex:pageBlockTable value="{!account.hist}" var="accounthistory" rows="100"> <apex:column value="{!accounthistory.createddate}"/>
<apex:column value="{!accounthistory.createdby.name}"/>
<apex:column value="{!accountHistory.field}"/>
<apex:column value="{!accounthistory.oldvalue}"/>
<apex:column value="{!accounthistory.newvalue}"/>
</apex:pageBlockTable> </apex:pageBlock>


Thanks!