• Madhanprabhu Thangadurai 1
  • NEWBIE
  • 115 Points
  • Member since 2014
  • Salesforce Certified Administrator and Developer


  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 30
    Replies
Hi,
I have two objects doctor, appointment and there is a lookup relationship between them.  have a fields called appointment_date__c(date/time type) and doctor__c lookup field in Appointment.
Now i have to delete the Appointment records those are Schedule is 'Confirm'(Doctor object field) and current time is 30m before from appointment_date__c field time.

for suppose 5 records appointment time is 6:30PM and current time is 6:00PM, this 5 records have to fetch and delete.

My Batch Class:

Global class AppointmentDelete implements database.Batchable<sObject>{
    global database.QueryLocator start(database.BatchableContext BC){
    string c='Confirm';
    String query='Select id,Name, doctor__r.name from Appointment__C where doctor__r.Schedule__c =\'' + c + '\'';
    system.debug('>>>>>>>query: '+query);
    return database.getQueryLocator(query);
    }
    
    global Void execute(database.BatchableContext BC, List<Appointment__C> scope ){
            
        delete scope;
       
    }
    
    global void finish(database.BatchableContext BC){
        
    }
}

 
  • April 19, 2015
  • Like
  • 0
Hi All,
I have a requiremnt that an user cant select a date of past in date picker list in visual force page and if he selects/enters a date of past an error msg should be displayed.
Note:This date field on Vf page is a dummy field and is not present on object level.
I am attaching my Vf code and controller along with my screen shot.
public class HarjeetWrapper{
             private Set<Id> selectedContactIds;
             public String selectedActions{get;set;}
             public Date dat {get;set;}
              

            


            public ApexPages.StandardSetController setCon {
            get {
                if(setCon == null) {
                    setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                      [select Id, Name,csord__Status__c, csord__Account__c from csord__Subscription__c where csord__Account__c=:accountid ]));
                             }
                            setCon.setPageSize(20);
                        return setCon;
                }
        set;
    }
    public List<csord__Subscription__c > getWrapSubscriptionList() {
         
         // setCon.setpagesize(20);
         setCon.setpageNumber(1);
         return (List<csord__Subscription__c >) setCon.getRecords();
    }
    public Integer getPageNumber(){
 
        return this.setCon.getPageNumber();
 
    }
    

 


   Public Integer getTotalPages(){
 
        Decimal totalSize = this.setCon.getResultSize();
        Decimal pageSize = this.setCon.getPageSize();
 
        Decimal pages = totalSize/pageSize;
 
        return (Integer)pages.round(System.RoundingMode.CEILING);
     }
 

    //Our collection of the class/wrapper objects wrapAccount
    public List<wrapSubscription> wrapSubscriptionList {get; set;}
    public List<csord__Subscription__c> selectedSubscriptions{get;set;}
    public Boolean isCancel{get;set;}
    public string accountid;
    
    
    public HarjeetWrapper(){
      accountid=ApexPages.currentPage().getParameters().get('id');
        if(wrapSubscriptionList == null) {
           wrapSubscriptionList= new List<wrapSubscription>();
            for(csord__Subscription__c s: [select Id, Name,csord__Status__c, csord__Account__c from csord__Subscription__c where csord__Account__c=:accountid ]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapSubscriptionList.add(new wrapSubscription(s));
            }
        }
    }
    
    
    public void processSelected() {
    selectedSubscriptions = new List<csord__Subscription__c>();
 
        for(wrapSubscription wrapSubscriptionObj : wrapSubscriptionList) {
            if(wrapSubscriptionObj.selected == true) {
                selectedSubscriptions.add(wrapSubscriptionObj.sub);
            }
        }
    }
    
    public PageReference cancel(){
        return new PageReference('/'+accountid);
    }
    
    public void next(){

    if(this.setCon.getHasNext())
        this.setCon.next();

}

 public void previous(){

    if(this.setCon.getHasPrevious())
        this.setCon.previous();

}
        public List<SelectOption> getCountriesOptions() {
        List<SelectOption> countryOptions = new List<SelectOption>();
        countryOptions.add(new SelectOption('','-None-'));
        countryOptions.add(new SelectOption('Take Over','Take Over'));
        countryOptions.add(new SelectOption('Invoice Switch','Invoice Switch'));
        countryOptions.add(new SelectOption('Move','Move'));
        /*countryOptions.add(new SelectOption('Germany','Germany'));
        countryOptions.add(new SelectOption('Ireland','Ireland'));*/
 
        return countryOptions;
}




                         
 
    // This is our wrapper/container class. In this example a wrapper class contains both the standard salesforce object Account and a Boolean value
    public class wrapSubscription {
        public csord__Subscription__c sub {get; set;}
        public Boolean selected {get; set;}
 
        public wrapSubscription(csord__Subscription__c s) {
            sub = s;
            selected = false;
        }
    }
}
<apex:page docType="html-5.0" controller="HarjeetWrapper" sidebar="false" showHeader="false">



    <script type="text/javascript">
        function selectAllCheckboxes(obj,receivedInputID){
            var inputCheckBox = document.getElementsByTagName("input");
            for(var i=0; i<inputCheckBox.length; i++){
                if(inputCheckBox[i].id.indexOf(receivedInputID)!=-1){
                    inputCheckBox[i].checked = obj.checked;
                }
            }
        }
    </script>
    <apex:form >
        <apex:pageBlock >
        <apex:pageBlockSection >
        <apex:pageBlockSectionItem >
        <!-- <apex:outputText value="{!selectedActions}" label="You have selected:"/>-->
        <!--<apex:outputText label="Select the Action:"/>-->
        Select the Action:
        <!--<apex:outputPanel>-->
          <apex:selectList value="{!selectedActions}" multiselect="false" size="1">
                <apex:selectOption itemValue="Take Over" itemLabel="Take Over"/>
                <apex:selectOption itemValue="Invoice Switch" itemLabel="Invoice Switch"/>
                <apex:selectOption itemValue="Move" itemLabel="Move"/>
            </apex:selectList>
            <!--</apex:outputPanel>-->
            </apex:pageBlockSectionItem>
           </apex:pageBlockSection> 
           <apex:PageBlockSection >
            <apex:pageBlockSectionItem >
                Date: <apex:input type="date" value="{!dat}" required="true" />
             </apex:pageBlockSectionItem>
            <!--<apex:input value="{!myDate}" id="theTextInput" type="date"/>-->
        </apex:pageBlockSection>
    </apex:pageBlock>
 
    
        <apex:pageBlock title="Select Subscription"  >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Proceed " action="{!processSelected}" />
                <apex:commandButton value="Cancel" action="{!cancel}" immediate="true" />
            </apex:pageBlockButtons>
       <apex:pageblockSection title="Subscriptions" collapsible="false" columns="1" >
             <apex:pageBlockTable value="{!wrapSubscriptionList}" var="subWrap">
                    <apex:column >
                        <apex:facet name="header">
                            <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')" />
                        </apex:facet>
                        <!--<apex:inputCheckbox value="{!subWrap.selected}" id="inputId"/>-->
                                <apex:inputCheckbox value="{!subWrap.selected}" id="inputId" disabled="{!NOT(subWrap.sub.csord__Status__c=='Active')}" />
                    </apex:column>
                    
                    <!--<apex:column value="{!subWrap.sub.Name}" />-->
                    <apex:column headerValue="Subscription Name" > 
                        <!--<apex:commandLink value="{!subWrap.sub.Name}" action="/{!subWrap.sub.Id}"/>-->
                       <apex:outputLink value="/{!subWrap.sub.Id}" target="_blank"> {!subWrap.sub.Name} </apex:outputLink>
                   </apex:column>
                     <apex:column value="{!subWrap.sub.csord__Status__c}" />
                    <apex:column value="{!subWrap.sub.csord__Account__c}" />
                </apex:pageBlockTable>
                </apex:pageblockSection>
             <apex:commandButton rendered="{!setCon.hasPrevious}" value="first" action="{!setCon.first}"/>
            <apex:commandButton rendered="{!setCon.hasPrevious}" value="Previous" action="{!setCon.previous}"/>
            <apex:outputLabel value=" (page {!pageNumber} of {!totalPages})"/>
            <apex:outputText rendered="{!(setCon.pageNumber * setCon.pageSize) < setCon.ResultSize}" value="{!setCon.pageNumber * setCon.pageSize} Of {!setCon.ResultSize}"></apex:outputText>
            <apex:outputText rendered="{!(setCon.pageNumber * setCon.pageSize) >= setCon.ResultSize}" value="{!setCon.ResultSize} Of {!setCon.ResultSize}"></apex:outputText>
            <apex:commandButton rendered="{!setCon.hasNext}" value="next" action="{!setCon.next}"/>
            <apex:commandButton rendered="{!setCon.hasNext}" value="last" action="{!setCon.last}"/>

     <apex:pageBlock />
                
                
                <apex:pageblockSection title="Selected Subscriptions" collapsible="false" columns="1" >
                   <apex:pageBlockTable value="{!selectedSubscriptions}" var="c" id="table2" title="Selected Subscriptions" width="100%">
                    <!--<apex:column value="{!c.Name}" headerValue="Subscription Name"/>-->
                    <apex:column headerValue="Subscription Name" > 
                        <apex:commandLink value="{!c.Name}" action="/{!c.Id}" target="_blank"/> 
                      </apex:column> 
                    <apex:column value="{!c.csord__Status__c}" headerValue="Status"/>
                    <apex:column value="{!c.csord__Account__c}" headerValue="Account"/>
                </apex:pageBlockTable>
            

            </apex:pageblockSection>
        </apex:pageBlock>
    </apex:form>
 
</apex:page>
screen shot
Please help me out in this situation,i really need to solve this as soon as possible.
Many thanks in advance.
Note:Pls dont suggest/refer a link to me for this as i have gone through so many links but no luck.So pls look into my code which i have posted here and modify that accordingly.I am seeking help from last 4 days in this forum.



 
User-added image
i want to redirect to opp record after clicking on opportunity name in salesforce1 mobile app. but getting this error while using sforce.one.navaigateToSobject(id)
Hello All,

My requirement is to display multiple sub tabs under a single primary tab when a link is clicked. Here i have written a visualforce page to achieve the scenario. But I'm not able to achieve it. I can open only one sub tab and seems like the second sub tab is getting overridden with first sub tab. Thanks your help.
<apex:page standardController="Case">

    <A HREF="#" onClick="callMultipleSubTabs();return false">
        Click here to open a new subtab</A> 
    <apex:includeScript value="/soap/ajax/37.0/connection.js"/>
    <apex:includeScript value="/support/console/37.0/integration.js"/>
    <script type="text/javascript">
        var strURL;
        var strTitle;
        sforce.connection.sessionId = '{!$Api.Session_ID}';
        
        function testOpenSubtab(inputURL,inputTitle) {
            strURL = inputURL;
            strTitle = inputTitle;
            //First find the ID of the primary tab to put the new subtab in
            sforce.console.getEnclosingPrimaryTabId(openSubtab);
        }
        
        var openSubtab = function openSubtab(result) {
            //Now that we have the primary tab ID, we can open a new subtab in it
            var primaryTabId = result.id;
            sforce.console.openSubtab(primaryTabId , strURL, true, 
                strTitle, null, openSuccess, strTitle);
        };
        
        var openSuccess = function openSuccess(result) {
            //Report whether we succeeded in opening the subtab
            alert('Result'+result);
            if (result.success == true) {
                alert('subtab successfully opened');
            } else {
                alert('subtab cannot be opened');
            }
        };
            
            
        function callMultipleSubTabs()
        {
            //sforce.connection.sessionId = '{!$Api.Session_ID}';
            var caseIds = "5009000000VxOsE;5009000000VxOsD";
            var caseTitle = "00001001;00001000";
            
            var id = caseIds.split(";");
            var title = caseTitle.split(";")
            var baseUrl = "{!LEFT($CurrentPage.URL,FIND('/',$CurrentPage.URL,9))}";
            
            for(i=0;i<id.length ; i++)
            {
                if(sforce.console.isInConsole())
                {
                    //alert('In console');
                    var caseURL = id[i];
                    var caseTitleLbl = title[i];
                    //alert('Case URL'+caseURL);
                    
                    testOpenSubtab(caseURL,title[i]);
                    alert('Case URL'+caseURL);
                }
                else
                {
                    window.open("/"+id[i],'_blank');
                    window.focus();
                }
            }
            
            
        }
        

    </script>
</apex:page>

 
Is it possible to do bulk record update in my Child Record using Process Builder and Flows Combination ?

My Scenario is - Whenever the Account Owner Changes (in Bulk), the related Contact Owners should be changed. 

Can someone help me how to achieve this using Process Builder and Flows Combination ?
Hi Guys,

I'm trying to implement the basic Salesforce1 navigation in my Developer Org. I'm using the following code snippet to navigate from a Command Link to Related List of a Custom Object. I have hard-coded the Related List ID and Parent Record ID in the javascript.

<apex:page showHeader="false" > 
<script type="text/javascript"> 
function navigateToList() 

     if( (typeof sforce.one != 'undefined') && (sforce.one != null) ) 
     { 
          sforce.one.navigateToRelatedList('00N9000000DQ4yq','a049000000WQcOO'); 
     } 

</script> 
<apex:form > 
     <apex:commandLink value="Navigate to link" onclick="navigateToList();"/> 
</apex:form> 
</apex:page>

But when i try to click on the Command Link ( Navigate To Link ), i'm getting the following Error. Your helps are highly appreciated. Thanks in advance.

User-added image
Is it possible to do bulk record update in my Child Record using Process Builder and Flows Combination ?

My Scenario is - Whenever the Account Owner Changes (in Bulk), the related Contact Owners should be changed. 

Can someone help me how to achieve this using Process Builder and Flows Combination ?
Hi,

I'm trying to change the background colour of a DIV on a VF page based on the value of a field. Since I have multiple options, it seems the best way to do this is to use the CASE function. However, I can't seem to get it to work. 

I have the follwing code:
<div class="programstatus" style="background-color:{!CASE(program.Program_Status__c == 'Applications Open', '#67AC34', program.Program_Status__c == 'Applications Closed' , '#F12923' )}">
                <apex:outputText value="{!program.Program_Status__c}"></apex:outputText>
                </div>

However, when I try to save, I get the following error: Error: Incorrect argument type for function 'CASE()'.

Any idea I'm doing wrong?
Thanks
  • April 26, 2015
  • Like
  • 0
I am trying to create a process and I need to evaluate multiple criteria the way I would in a workflow.  In this example I'm trying to evaluate if the state is a Canadian province.  I've tried State/Province EQUALS NB,NL,NS,ON,PE,QC,AB,BC,MB,SK,NT,NU,YT as well as using a formuala with contains such as CONTAIN( [Account].StateProvince,NB:NL:NS:ON:PE:QC:AB:BC:MB:SK:NT:NU:YT) but neither seems to work.  What format is process builder expecting to recieve in that field?
Hello,

Where i can start off to learn lightning components. 

I followed few tutorials but it becomes very difficult to customize something.

 
  • April 22, 2015
  • Like
  • 0
I just completed the latest Trailhead module Application Lifecycle Management and iit ssays I have 18 badges but when I go to my profile page, it only shows 17. This hasn't happened previously. Is there some known bug?Passed moduleProfile only shows 17 badges
Hi,
I have two objects doctor, appointment and there is a lookup relationship between them.  have a fields called appointment_date__c(date/time type) and doctor__c lookup field in Appointment.
Now i have to delete the Appointment records those are Schedule is 'Confirm'(Doctor object field) and current time is 30m before from appointment_date__c field time.

for suppose 5 records appointment time is 6:30PM and current time is 6:00PM, this 5 records have to fetch and delete.

My Batch Class:

Global class AppointmentDelete implements database.Batchable<sObject>{
    global database.QueryLocator start(database.BatchableContext BC){
    string c='Confirm';
    String query='Select id,Name, doctor__r.name from Appointment__C where doctor__r.Schedule__c =\'' + c + '\'';
    system.debug('>>>>>>>query: '+query);
    return database.getQueryLocator(query);
    }
    
    global Void execute(database.BatchableContext BC, List<Appointment__C> scope ){
            
        delete scope;
       
    }
    
    global void finish(database.BatchableContext BC){
        
    }
}

 
  • April 19, 2015
  • Like
  • 0

Hello,
It would be great f someone could help me out.

1. the Salesforce OrgIDs are not synced as you see here:
User-added image

Problem #2: see the challege and my result, and still fails - I think this should be correct, or ?

User-added image

Thank you for your help

Christian

I have created a Flow for Lead data - a screen is used within the loop to display lead data that needs verified/enhanced by phone.  The issue is that the loop seems to be working - I can tell as the emails get sent with data that progresses through the loop.  That data (names. etc) are not displayed on the screen and the loop is infinite as it keeps cycling through the data over and over, but never showing the finish button or terminating.  Any help would be greatly appreciated.



 
Hello,

I'm newbee for SFDC and please clarify my below doubt.

While creating custome VF page, we create custom Controllers as class, Fields as variables and the logic which ever written in that class controlls Controller behaviour of the page.. This is what I know for custom page creation using VF

But my question is.....

1. Assume I created a custom object and created 2 fields using customization, How can I create a custom controller for this page? How can I write a behaviour of those 2 fields?

2. I don't see Developer mode coumn (at the bottom of the page) for a page which is achieved through customization but I can only see for custome VF Page.

Please clarify and thanks in advance.
 
Hi Experts,
 
Our organization having custom object Job.
Organization having below data.
Two record types 1. Direct, 2. Indirect on Job object.
Two profiles 1. Direct, 2. Indirect
 
As of now Direct profile users accessing only Direct recordtype, and Indirect profile users accessing only Indirect recordtype.
Now I created new profile name as Direct & Indirect. I want to give both record type access to this profile user.
Please anyone help me out.
Thanks in advance.
 
Thanks,
Manu
Hi,

We have created an visual force and it has list of records. While configuring the page in console app as custom console component the scroll bar is not working. any ideas?

thanks
wats is use of junction object ,why and when do we use it
I am trying to run this snippet in Developer Console,
Set<Id> setProdIds = new Set<Id>();
for( Product2 prod : [ SELECT Id FROM Product2 WHERE Division__c IN ('SIOUX FALLS','RAPID CITY')])
	setProdIds.add(prod.Id);
Set<Id> setOppIds = new Set<Id>();	
for( Integer iCount = 0; iCount <= 28; iCount++ )
{
	List<OpportunityLineItem> lstLineItems = [SELECT OpportunityId FROM OpportunityLineItem WHERE Product2Id IN: setProdIds AND Id NOT IN: setOppIds LIMIT 25000];
	system.debug('Size of list:'+lstLineItems);
	for( OpportunityLineItem lineItem : lstLineItems )
		setOppIds.add(lineItem.OpportunityId);    
}
List<Opportunity> lstOpportunities = [SELECT Id FROM Opportunity WHERE Division__c IN ('SIOUX FALLS','RAPID CITY') AND Id IN: setOppIds LIMIT 25000];
system.debug('Total opps to migrate:'+lstOpportunities.size());
Now, even if I have kept the LIMIT 25000, it throws error "System.LimitException:50001 rows".

Thanks in advance!
 
Help me to understand salesforce and funcationality to know..
Hi,

  I am using below conditional display of text based on region but its not working please suggest me how to fix this issue.  

   {! IF( !DealReg__c.Theater__c = 'NAM', 'Westcon Group' , '')}  {! IF( !DealReg__c.Theater__c = 'EMEA', 'Westcon Group' , '')}

Thanks
Sudhir
Hi All,
I have a requiremnt that an user cant select a date of past in date picker list in visual force page and if he selects/enters a date of past an error msg should be displayed.
Note:This date field on Vf page is a dummy field and is not present on object level.
I am attaching my Vf code and controller along with my screen shot.
public class HarjeetWrapper{
             private Set<Id> selectedContactIds;
             public String selectedActions{get;set;}
             public Date dat {get;set;}
              

            


            public ApexPages.StandardSetController setCon {
            get {
                if(setCon == null) {
                    setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                      [select Id, Name,csord__Status__c, csord__Account__c from csord__Subscription__c where csord__Account__c=:accountid ]));
                             }
                            setCon.setPageSize(20);
                        return setCon;
                }
        set;
    }
    public List<csord__Subscription__c > getWrapSubscriptionList() {
         
         // setCon.setpagesize(20);
         setCon.setpageNumber(1);
         return (List<csord__Subscription__c >) setCon.getRecords();
    }
    public Integer getPageNumber(){
 
        return this.setCon.getPageNumber();
 
    }
    

 


   Public Integer getTotalPages(){
 
        Decimal totalSize = this.setCon.getResultSize();
        Decimal pageSize = this.setCon.getPageSize();
 
        Decimal pages = totalSize/pageSize;
 
        return (Integer)pages.round(System.RoundingMode.CEILING);
     }
 

    //Our collection of the class/wrapper objects wrapAccount
    public List<wrapSubscription> wrapSubscriptionList {get; set;}
    public List<csord__Subscription__c> selectedSubscriptions{get;set;}
    public Boolean isCancel{get;set;}
    public string accountid;
    
    
    public HarjeetWrapper(){
      accountid=ApexPages.currentPage().getParameters().get('id');
        if(wrapSubscriptionList == null) {
           wrapSubscriptionList= new List<wrapSubscription>();
            for(csord__Subscription__c s: [select Id, Name,csord__Status__c, csord__Account__c from csord__Subscription__c where csord__Account__c=:accountid ]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapSubscriptionList.add(new wrapSubscription(s));
            }
        }
    }
    
    
    public void processSelected() {
    selectedSubscriptions = new List<csord__Subscription__c>();
 
        for(wrapSubscription wrapSubscriptionObj : wrapSubscriptionList) {
            if(wrapSubscriptionObj.selected == true) {
                selectedSubscriptions.add(wrapSubscriptionObj.sub);
            }
        }
    }
    
    public PageReference cancel(){
        return new PageReference('/'+accountid);
    }
    
    public void next(){

    if(this.setCon.getHasNext())
        this.setCon.next();

}

 public void previous(){

    if(this.setCon.getHasPrevious())
        this.setCon.previous();

}
        public List<SelectOption> getCountriesOptions() {
        List<SelectOption> countryOptions = new List<SelectOption>();
        countryOptions.add(new SelectOption('','-None-'));
        countryOptions.add(new SelectOption('Take Over','Take Over'));
        countryOptions.add(new SelectOption('Invoice Switch','Invoice Switch'));
        countryOptions.add(new SelectOption('Move','Move'));
        /*countryOptions.add(new SelectOption('Germany','Germany'));
        countryOptions.add(new SelectOption('Ireland','Ireland'));*/
 
        return countryOptions;
}




                         
 
    // This is our wrapper/container class. In this example a wrapper class contains both the standard salesforce object Account and a Boolean value
    public class wrapSubscription {
        public csord__Subscription__c sub {get; set;}
        public Boolean selected {get; set;}
 
        public wrapSubscription(csord__Subscription__c s) {
            sub = s;
            selected = false;
        }
    }
}
<apex:page docType="html-5.0" controller="HarjeetWrapper" sidebar="false" showHeader="false">



    <script type="text/javascript">
        function selectAllCheckboxes(obj,receivedInputID){
            var inputCheckBox = document.getElementsByTagName("input");
            for(var i=0; i<inputCheckBox.length; i++){
                if(inputCheckBox[i].id.indexOf(receivedInputID)!=-1){
                    inputCheckBox[i].checked = obj.checked;
                }
            }
        }
    </script>
    <apex:form >
        <apex:pageBlock >
        <apex:pageBlockSection >
        <apex:pageBlockSectionItem >
        <!-- <apex:outputText value="{!selectedActions}" label="You have selected:"/>-->
        <!--<apex:outputText label="Select the Action:"/>-->
        Select the Action:
        <!--<apex:outputPanel>-->
          <apex:selectList value="{!selectedActions}" multiselect="false" size="1">
                <apex:selectOption itemValue="Take Over" itemLabel="Take Over"/>
                <apex:selectOption itemValue="Invoice Switch" itemLabel="Invoice Switch"/>
                <apex:selectOption itemValue="Move" itemLabel="Move"/>
            </apex:selectList>
            <!--</apex:outputPanel>-->
            </apex:pageBlockSectionItem>
           </apex:pageBlockSection> 
           <apex:PageBlockSection >
            <apex:pageBlockSectionItem >
                Date: <apex:input type="date" value="{!dat}" required="true" />
             </apex:pageBlockSectionItem>
            <!--<apex:input value="{!myDate}" id="theTextInput" type="date"/>-->
        </apex:pageBlockSection>
    </apex:pageBlock>
 
    
        <apex:pageBlock title="Select Subscription"  >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Proceed " action="{!processSelected}" />
                <apex:commandButton value="Cancel" action="{!cancel}" immediate="true" />
            </apex:pageBlockButtons>
       <apex:pageblockSection title="Subscriptions" collapsible="false" columns="1" >
             <apex:pageBlockTable value="{!wrapSubscriptionList}" var="subWrap">
                    <apex:column >
                        <apex:facet name="header">
                            <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')" />
                        </apex:facet>
                        <!--<apex:inputCheckbox value="{!subWrap.selected}" id="inputId"/>-->
                                <apex:inputCheckbox value="{!subWrap.selected}" id="inputId" disabled="{!NOT(subWrap.sub.csord__Status__c=='Active')}" />
                    </apex:column>
                    
                    <!--<apex:column value="{!subWrap.sub.Name}" />-->
                    <apex:column headerValue="Subscription Name" > 
                        <!--<apex:commandLink value="{!subWrap.sub.Name}" action="/{!subWrap.sub.Id}"/>-->
                       <apex:outputLink value="/{!subWrap.sub.Id}" target="_blank"> {!subWrap.sub.Name} </apex:outputLink>
                   </apex:column>
                     <apex:column value="{!subWrap.sub.csord__Status__c}" />
                    <apex:column value="{!subWrap.sub.csord__Account__c}" />
                </apex:pageBlockTable>
                </apex:pageblockSection>
             <apex:commandButton rendered="{!setCon.hasPrevious}" value="first" action="{!setCon.first}"/>
            <apex:commandButton rendered="{!setCon.hasPrevious}" value="Previous" action="{!setCon.previous}"/>
            <apex:outputLabel value=" (page {!pageNumber} of {!totalPages})"/>
            <apex:outputText rendered="{!(setCon.pageNumber * setCon.pageSize) < setCon.ResultSize}" value="{!setCon.pageNumber * setCon.pageSize} Of {!setCon.ResultSize}"></apex:outputText>
            <apex:outputText rendered="{!(setCon.pageNumber * setCon.pageSize) >= setCon.ResultSize}" value="{!setCon.ResultSize} Of {!setCon.ResultSize}"></apex:outputText>
            <apex:commandButton rendered="{!setCon.hasNext}" value="next" action="{!setCon.next}"/>
            <apex:commandButton rendered="{!setCon.hasNext}" value="last" action="{!setCon.last}"/>

     <apex:pageBlock />
                
                
                <apex:pageblockSection title="Selected Subscriptions" collapsible="false" columns="1" >
                   <apex:pageBlockTable value="{!selectedSubscriptions}" var="c" id="table2" title="Selected Subscriptions" width="100%">
                    <!--<apex:column value="{!c.Name}" headerValue="Subscription Name"/>-->
                    <apex:column headerValue="Subscription Name" > 
                        <apex:commandLink value="{!c.Name}" action="/{!c.Id}" target="_blank"/> 
                      </apex:column> 
                    <apex:column value="{!c.csord__Status__c}" headerValue="Status"/>
                    <apex:column value="{!c.csord__Account__c}" headerValue="Account"/>
                </apex:pageBlockTable>
            

            </apex:pageblockSection>
        </apex:pageBlock>
    </apex:form>
 
</apex:page>
screen shot
Please help me out in this situation,i really need to solve this as soon as possible.
Many thanks in advance.
Note:Pls dont suggest/refer a link to me for this as i have gone through so many links but no luck.So pls look into my code which i have posted here and modify that accordingly.I am seeking help from last 4 days in this forum.



 
I started using Trailhead a couple of days ago, and completed the first two badges.  The only problem is that the second badge doesn't show up on my profile.

Screenshot illustrating missing badge

Is there a way to get this glitch worked out?  Because I want to use these badges in social media to illustrate to co-workers that I am making progress toward certifications faster than they are.

Thanks,
Hi
 
I have multicurrency activated in my org (non advanced) and so the current exchange rates are stored in the CurrrencyType object.
 
We are global so opportunities are stored in the local exhange rate.  GBP, EUR, CHF etc. and the corporate currency is set as USD.
 
I need to be able to record an amount (in a new field) on the opportunity in USD but cannot access the CurrencyType object in which to create a formula with the ConversionRate to the local amount field.
 
Has anyone any "out of the box" solutions as it looks as though I'm going to have to do this in APEX code which seems a little unneccessary.
 
Regards
Paul