• Saikiran Kolli
  • NEWBIE
  • 70 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 38
    Questions
  • 25
    Replies
Hi Everyone, 

I'm trying to fetch the data from 2 Data Extensions and inserting into another data extension , below is the code which is not helping. Can anyone help me where I'm doing wrong


%%[ 

set @Subs = AttributeValue('_SubscriberKey')
 set @JobId = AttributeValue('jobID')
 set @memberid = AttributeValue("memberid")
 set @pageURL = RequestParameter("PAGEURL")

 
 Set @lookUp = LookupRows('Page Visits','Subscriber Key', @Subs,'jobid', @jobid)
 SET @variableA  = LookupRows('BU Details','memberid', @memberid)
 
 SET @variableB  = LookupRows('Landing Page Details','CPID',@CPID)

IF Rowcount(@variableA) >0 THEN
   SET @BURow = Row(@lookupvalue, 1)
   Set @BUName = Field(@BURow, 'BUName')
ENDIF 

IF Rowcount(@variableB) >0 THEN
   SET @CPRow = Row(@lookupvalue1, 1)
   Set @CPNAME = Field(@CPRow, 'CPNAME')
ENDIF 
 
 
 IF RowCount(@lookUp) == 0 THEN 
 InsertData('Page Visits','Subscriber Key', @Subs,'jobid', @jobid,'memberid', @memberid, 'BUName', @BUName , 'pageURL', @pageURL,'CPNAME', @CPNAME,'Event Date', NOW())
ENDIF 
 ]%%
Hi,

 Currently we are moving project into other data base, we are facing difficulties in moving creditcard information to decrypt . Please let me know how to achive this .
Hi,

I'm moving my production data to sql server, working on data migration. In my org, there is a Text(Encrypted) field, I want to see that field values. As i used that field in apex class, I'm unable to change the field type. Please suggest me how to Decrypt the data. 

I tired using " View Encrypted Data" by checking the checkbox in the profile, but its showing only the data which I have entered after checking the check box. Can any one suggest me how to see old data.
Hi,

I'm moving my production data to sql server, working on data migration. In my org, there is a Text(Encrypted) field, I want to see that field values. As i used that field in apex class, I'm unable to change the field type. Please suggest me how to Decrypt the data. 
Hi, I'm working on integration. I want to see the information of all fields. In my org, one field data type is Text(Encrypted). As I used that field in apex classes, Now I'm unable to change the field type. Please suggest me how to Decrypt the data.
I'm having a visualforce page with two buttons button 1 and button 2 .
If I click on button1 , button2 should be shaded or darken but it has to be work. same like If I click on button2 , button1 must be shaded or darken but it has to work.
 
Hi,

Im using apex:select list in VF page, I'm getting values from controller.

values are like below:
Pen
pencil
chart
book
tools
bags
bucks
charts

In the above list for "Charts" when the user select charts in the picklist, another pick list must be enabled. with values chart1, chart 2, chart 3.

Only when the user select charts second pick list must be enabled.

Please help me.
 
Hi,


I'm having a student object.
I'm having a dropdown filed. values are 1,2,3,4,5,6,7

If a kid registered today for value 1, exactly after 1 year his value must be changed to 2.
How to update the dropdown field automatically. Please help me
Hi,

I'm having a student page with status field(drop down)- active , inactive , onhold.

If the status is inactive or onhold it must display activate student button

            <apex:commandButton oncomplete="j$('#succToastMsg').text('Student activated successfully, please continue with subjects');j$('.slds-notify_container').show();j$('#stuActModal').addClass('slds-fade-in-open');j$('.slds-backdrop').addClass('slds-backdrop--open');" value="Activate Student" action="{!acticeStudent}" rendered="{(!Student__c.Status__c == 'On Hold') || (!Student__c.Status__c == 'Inactive') && (!inactiveConfirmation)  && (!doPaymentConfirmation)}" rerender="op,htt,contSubjsOP" status="status"/> 


I written above line but its not working.

If the changed the  rerendered to  rendered="{!Student__c.Status__c == 'Inactive'  && !inactiveConfirmation  && !doPaymentConfirmation}" then its working for inactive.
It must also work for onhold status. Please help me.
Hi,

How to see wheter an application is sales cloud or service cloud??
Hi,

What is maximum size of file downloaded using renderas in VF page.
Hi,

My Scenario is I'm having 15 boxes. Client will order 100 books. I'm having picklist box1,box2...box15 .
I will add 10books(order line items) in box 1
Again next 10 books in box 2.
Then after clicking on Save button it will recdirect to new page where all the data will be displayed.

In the new page when I select box 1, it must show the 10books.'(with their book name, quantity, supplied quantity will be displayed.)
same for other boxes.

Books are adding in the supplied quantity but When i select box 1 in the New page its not showing any quantity. For that I have to add order line items in box.

Selected box is string, Supplied quantity is integer. I need to add integer into string. Please help me
<apex:outputLabel >Choose Box to Save</apex:outputLabel>
                       
                    </apex:pageBlockSectionItem>
        <apex:selectList value="{!SelectedBox}" size="1">

                    <apex:selectOptions value="{!Boxoptions}"></apex:selectOptions>
                </apex:selectList>

Constructor: 

public bulkff(){
    Boxoptions=new list<SelectOption>();
    lineItemName=new set<String>();
       orderItemsList=new list<Order_Line_Items__c>();
       OrderLineItems();
       String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       }


Method: 

     public void OrderLineItems(){
      Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : ApexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
      
      orderItemsList = [Select Id, Name, Difference__c, Order__c, Quantity__c, Select_Box__c, Supplied_Quantity__c, Type__c from Order_Line_Items__c where Order__c=:Apexpages.currentpage().getParameters().get('id')];
       
        
        for(Order_Line_Items__c old : orderItemsList)
        {
            
             //   selectedbox.add(orderItemsList);   

// Here I'm trying to add orderitemslist into a selected box but its throwing an error, Incorrect signature, I tried in all ways but its not working. Please help me
                     
             
        }
}

 
Hi, 


I'm having 15 boxes(Pick list) .I'm adding order line items into those 15 boxes... For ex: I'm selecting box 1 and adding values in supplied quantity field. and clicking on save.. when I select the box in other page values are not showing... but here in the previous page values are displaying. Please help me
<apex:selectList value="{!SelectedBox}" size="1">

                    <apex:selectOptions value="{!Boxoptions}"></apex:selectOptions>
                </apex:selectList>   


public bulkff(){
    Boxoptions=new list<SelectOption>();
    lineItemName=new set<String>();
       orderItemsList=new list<Order_Line_Items__c>();
       OrderLineItems();
       String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       }
     public void OrderLineItems(){
      Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : ApexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
      
      orderItemsList = [Select Id, Name, Difference__c, Order__c, Quantity__c, Select_Box__c, Supplied_Quantity__c, Type__c from Order_Line_Items__c where Order__c=:Apexpages.currentpage().getParameters().get('id')];
       
        
        for(Order_Line_Items__c old : orderItemsList)
        {
            
             //   selectedbox.add(orderItemsList);
                     
             
        }
}





Unable to add orderitems list into selected box

 
Hi,

I'm having 15 boxes(Pick list) .I'm adding order line items into those 15 boxes... For ex: I'm selecting box 1 and adding values in supplied quantity field. and clicking on save.. when I select the box in other page values are not showing... but here in the previous page values are displaing  
public with sharing class bulkff {

 public String SelectedBox{Set;Get;}
 public List<Orders__c> order {get;set;} 
 List < Order_Line_Items__c > listOfItems ;
  public list<SelectOption> Boxoptions{set;get;}
  Public list<Order_Line_Items__c> orderItemsList{Set;Get;}
  set<String> lineItemName{Set;Get;}
  public String oid{get;set;}
  public String olit{get;set;}
  List < Order_Line_Items__c > list1;
   public Order_Line_Items__c OrdlItem{Set;Get;}
    
    public bulkff(){
    Boxoptions=new list<SelectOption>();
    lineItemName=new set<String>();
       orderItemsList=new list<Order_Line_Items__c>();
       OrderLineItems();
       String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       }
     public void OrderLineItems(){
      Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : apexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
      
      orderItemsList = [Select Id, Name, Difference__c, Order__c, Quantity__c, Select_Box__c, Supplied_Quantity__c, Type__c from Order_Line_Items__c where Order__c=:Apexpages.currentpage().getParameters().get('id') AND Compare__c = 'false'];
        for(Order_Line_Items__c old : orderItemsList)
        {
            
           if(old.Select_Box__c== '' || old.Select_Box__c == '--None--' || old.Select_Box__c == null ){
           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));
          
        }
 
        }
     
     
}

public void refresh()
{
if(SelectedBox=='' || SelectedBox==null || SelectedBox=='--None--')
       {
       
           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));
     
       }
       
       
}
     public pagereference updatevalue()
    {
       if(orderitemslist.size()>0)
        {
            update orderitemslist;
            OrderLineItems();
        }
  return new Pagereference('/apex/orderView?id='+order[0].id).setredirect(true); 
}    
}




<apex:page controller="bulkff" sidebar="false" id="page" tabStyle="Orders__c">

  <html>

<title>Print Test Page</title>

 <style type="text/css">
   .outBorder {
    border:3px outset black;
   }
   .inBorder{
    border-top:2px inset black;
    border-left:2px inset black;
   }
    
  </style>
  
 
<script>

function printDiv(divId) 
{
       var result = document.getElementById('page:form:pb1:pbstbl:pbsi:sl').value;
        if (result == "--None--") 
            {
                alert("Please Select Box");
            }
            else{
  
        window.frames["print_frame"].document.body.innerHTML=document.getElementById(divId).innerHTML;
        window.frames["print_frame"].window.focus();
        window.frames["print_frame"].window.print();
        }      
  }  
</script>

<body>

</body>

    
    <script src="{!URLFOR($Resource.jQuery,'')}"/>
    <script type="text/javascript">
       var j$ = jQuery.noConflict();
       
      
           function focusme()
           {
               var inpele = j$("input[id$='xyz']");
               inpele.val("");
               inpele.focus();
           }
       
    </script>
  
    <apex:outputPanel id="errorpanel">
    <apex:pageMessages id="showMsg" />
    </apex:outputPanel>
    <apex:form id="form">
        <apex:pageBlock title="Bulk Fulfill" id="pb1" >
            <apex:outputpanel id="panel">
            
                <apex:pageBlockSection columns="1">
                
                   <apex:pageBlockSectionItem >
                        <apex:outputLabel >Choose Box to Save</apex:outputLabel>
                       
                    </apex:pageBlockSectionItem>
        <apex:selectList value="{!SelectedBox}" size="1">
                    <apex:selectOptions value="{!Boxoptions}"></apex:selectOptions>
                </apex:selectList>
                </apex:pageBlockSection>
                
                <apex:pageBlockSection columns="1" >
                 <apex:outputField value="{!order[0].name}"/>
                 <apex:outputField value="{!order[0].Location__c}" />
          
     <br/>
             </apex:pageblocksection>
             
               </apex:outputpanel>
      
    <apex:outputPanel id="tblpnl">
    <div id="itemsDiv">
  
     <apex:pageblockTable value="{!orderItemsList}" border="1" var="ord" id="theTable" rowClasses="odd,even" styleclass="outBorder" width="550px" rendered="{!orderItemsList.size>0}">
    
          <apex:column styleclass="inBorder">
             <apex:facet name="header">Subject</apex:facet>
              <apex:outputText value="{!ord.Name}"/>
         </apex:column>
        
        <apex:column styleclass="inBorder">
              <apex:facet name="header">Quantity</apex:facet>
              <apex:outputText value="{!ord.Quantity__c}"/>
        </apex:column>
        <apex:column styleclass="inBorder" >
            <apex:facet name="header">Supplied Quantity</apex:facet>
            <apex:inputText value="{!ord.Supplied_Quantity__c}"/>
            <apex:actionSupport event="onchange" action="{!refresh}" onbeforedomupdate="beep()"  reRender="pbstbl,xyz,errorpanel,pb1" oncomplete="focusme();"></apex:actionSupport>
        </apex:column>
    
       

  </apex:pageblockTable>
  
</div>
</apex:outputPanel>

   <apex:pageBlockButtons location="top">
   <apex:commandButton value="Save Value" action="{!updatevalue}"/>
   
   </apex:pageBlockButtons>             
           
   

        </apex:pageBlock>
    </apex:form>
    </html> 
</apex:page>

 
Hi,

I'm having a VF page with two fields Start Date & End Date.
Using date picker I'm getting the calendar, But the problem is when I open that page automatically Start date , End date values must be populated based on the current month.
For example: If I go to that VF page, as this month is september , start date must be 9/1/2016, End date must be 30/1/2016.
First date and Last date of the current month must be populated. 
Please help me
Hi,,
Can anyone help me to write test classes for below methods Please help me
public PageReference showPopup1()
    {    
       List<Student__c> str=[SELECT Id, Name FROM Student__c];
 pageReference pageRef = new PageReference('/apex/studentadmissionPage');

        pageRef.setRedirect(true);
        
       
        displayPopup = true; 
        
        return pageRef ;   
    
    }






      
    public void SubjectRegistered(){
    
         srsize = [select count() from Subject_Registered__c where Student__c =: subRegChangeDay.Student__c and Subject__c = : subRegChangeDay.Subject__c and Deactivated__c=false];
         if(subRegChangeDay.Subject__c == 'G.K')
         {
             stTime = false;
             enTime = false;
         }else{
         
             stTime = true;
             enTime = true;
         }
    }




    
    public integer getsizeofsr(){
        return srsize;
    }









    public PageReference closeChangeDay() {
            chnageDayFlg = false;
        return null;
    }

 
Hi,

My test class is not working please help me.
public  class google {

    public google(google1 controller) {

    }


    public google(ApexPages.StandardController controller) {

    }

public pagereference google() {
  return new pagereference('/apex/PlotGoogleMarker');
 
}

}







@isTest
public class googletest {
@isTest 
    static void test1() {
        PageReference ref = new PageReference('/apex/PlotGoogleMarker');
        Test.setCurrentPage(ref);
         ref = new PageReference('/apex/PlotGoogleMarker?id=');
        Test.setCurrentPage(ref);
        System.assertEquals('/apex/PlotGoogleMarker?id=recordId',Ref.getUrl());
    }
}

 
Hi,

In my organization for 5 users their passwords should not be expire forever, for remaning users it should be expired for 1 month. Please help me out of this.

Hi,

Sound must be produced at the time of error message and it should be in the same page

In this scenario I'm scanning books , when I scan wrong book or extra books I'm getting error message.

At the time of error message sound must be produced and again scanning must be continued.

I'm getting the sound but its redirecting to sound page. 

Please help me
public pagereference refresh()
    {
          
       if(WrapperMap.containsKey(reccode) && WrapperMap.get(reccode).OrdlItem.Quantity__c >=WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c)
       {
                if(WrapperMap.get(reccode).OrdlItem.Quantity__c == WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c){   
                
                
                          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'supplied quantity exceeded'));
                          
                          
                PageReference sound = new PageReference('/apex/sound');
                sound.setredirect(false);
            
                      
                }
                else
                    WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c+=1; 
                   
                    
                if(changedItemIds.add(WrapperMap.get(reccode).OrdlItem.Id))
                {
                    Order_Line_Items__c Ordlt=WrapperMap.get(reccode).OrdlItem;
                      Ordlt.Select_Box__c = SelectedBox;
                     UpdatedOrderLineItem.add(Ordlt);  
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Confirm,'Quantity Added'));
                    
                    
                }
        }
       else
          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'item not matched')); 
      
 PageReference sound = new PageReference('/apex/sound');
 sound.setredirect(false);
 return null;
  
    }

 
Hi,

Sound must be produced at the time of error message and it should be in the same page

In this scenario I'm scanning books , when I scan wrong book or extra books I'm getting error message.

At the time of error message sound must be produced and again scanning must be continued.

I'm getting the sound but its redirecting to sound page. 

Please help me
public pagereference refresh()
    {
       if(SelectedBox=='' || SelectedBox==null || SelectedBox=='--None--')
       {

           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));

       }  

     else   
       if(WrapperMap.containsKey(reccode) && WrapperMap.get(reccode).OrdlItem.Quantity__c >=WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c)
       {
                if(WrapperMap.get(reccode).OrdlItem.Quantity__c == WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c){   
                          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'supplied quantity exceeded'));

                    PageReference sound = new PageReference('/apex/sound');
                    sound.setRedirect(false);   

                }
                else
                    WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c+=1; 


                if(changedItemIds.add(WrapperMap.get(reccode).OrdlItem.Id))
                {
                    Order_Line_Items__c Ordlt=WrapperMap.get(reccode).OrdlItem;
                      Ordlt.Select_Box__c = SelectedBox;
                     UpdatedOrderLineItem.add(Ordlt);  
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Confirm,'Quantity Added'));


                }
        }
       else
          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'item not matched')); 

 PageReference sound = new PageReference('/apex/sound');
  sound.setRedirect(false);
  return null;
    }

 
Hi,

I'm moving my production data to sql server, working on data migration. In my org, there is a Text(Encrypted) field, I want to see that field values. As i used that field in apex class, I'm unable to change the field type. Please suggest me how to Decrypt the data. 
Hi,

In my organization for 5 users their passwords should not be expire forever, for remaning users it should be expired for 1 month. Please help me out of this.
 We have an input field via a bar code scanner and we want to make a beep sound when the field is ready for a new input. I cannot find an example with sample code how to do this. Is there a way to generate a beep sound in visualforce?
Hi,

I'm moving my production data to sql server, working on data migration. In my org, there is a Text(Encrypted) field, I want to see that field values. As i used that field in apex class, I'm unable to change the field type. Please suggest me how to Decrypt the data. 
I'm having a visualforce page with two buttons button 1 and button 2 .
If I click on button1 , button2 should be shaded or darken but it has to be work. same like If I click on button2 , button1 must be shaded or darken but it has to work.
 
Hi,

Im using apex:select list in VF page, I'm getting values from controller.

values are like below:
Pen
pencil
chart
book
tools
bags
bucks
charts

In the above list for "Charts" when the user select charts in the picklist, another pick list must be enabled. with values chart1, chart 2, chart 3.

Only when the user select charts second pick list must be enabled.

Please help me.
 
Hi,

My Scenario is I'm having 15 boxes. Client will order 100 books. I'm having picklist box1,box2...box15 .
I will add 10books(order line items) in box 1
Again next 10 books in box 2.
Then after clicking on Save button it will recdirect to new page where all the data will be displayed.

In the new page when I select box 1, it must show the 10books.'(with their book name, quantity, supplied quantity will be displayed.)
same for other boxes.

Books are adding in the supplied quantity but When i select box 1 in the New page its not showing any quantity. For that I have to add order line items in box.

Selected box is string, Supplied quantity is integer. I need to add integer into string. Please help me
<apex:outputLabel >Choose Box to Save</apex:outputLabel>
                       
                    </apex:pageBlockSectionItem>
        <apex:selectList value="{!SelectedBox}" size="1">

                    <apex:selectOptions value="{!Boxoptions}"></apex:selectOptions>
                </apex:selectList>

Constructor: 

public bulkff(){
    Boxoptions=new list<SelectOption>();
    lineItemName=new set<String>();
       orderItemsList=new list<Order_Line_Items__c>();
       OrderLineItems();
       String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       }


Method: 

     public void OrderLineItems(){
      Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : ApexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
      
      orderItemsList = [Select Id, Name, Difference__c, Order__c, Quantity__c, Select_Box__c, Supplied_Quantity__c, Type__c from Order_Line_Items__c where Order__c=:Apexpages.currentpage().getParameters().get('id')];
       
        
        for(Order_Line_Items__c old : orderItemsList)
        {
            
             //   selectedbox.add(orderItemsList);   

// Here I'm trying to add orderitemslist into a selected box but its throwing an error, Incorrect signature, I tried in all ways but its not working. Please help me
                     
             
        }
}

 
Hi, 


I'm having 15 boxes(Pick list) .I'm adding order line items into those 15 boxes... For ex: I'm selecting box 1 and adding values in supplied quantity field. and clicking on save.. when I select the box in other page values are not showing... but here in the previous page values are displaying. Please help me
<apex:selectList value="{!SelectedBox}" size="1">

                    <apex:selectOptions value="{!Boxoptions}"></apex:selectOptions>
                </apex:selectList>   


public bulkff(){
    Boxoptions=new list<SelectOption>();
    lineItemName=new set<String>();
       orderItemsList=new list<Order_Line_Items__c>();
       OrderLineItems();
       String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       }
     public void OrderLineItems(){
      Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : ApexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
      
      orderItemsList = [Select Id, Name, Difference__c, Order__c, Quantity__c, Select_Box__c, Supplied_Quantity__c, Type__c from Order_Line_Items__c where Order__c=:Apexpages.currentpage().getParameters().get('id')];
       
        
        for(Order_Line_Items__c old : orderItemsList)
        {
            
             //   selectedbox.add(orderItemsList);
                     
             
        }
}





Unable to add orderitems list into selected box

 
Hi,

I'm having 15 boxes(Pick list) .I'm adding order line items into those 15 boxes... For ex: I'm selecting box 1 and adding values in supplied quantity field. and clicking on save.. when I select the box in other page values are not showing... but here in the previous page values are displaing  
public with sharing class bulkff {

 public String SelectedBox{Set;Get;}
 public List<Orders__c> order {get;set;} 
 List < Order_Line_Items__c > listOfItems ;
  public list<SelectOption> Boxoptions{set;get;}
  Public list<Order_Line_Items__c> orderItemsList{Set;Get;}
  set<String> lineItemName{Set;Get;}
  public String oid{get;set;}
  public String olit{get;set;}
  List < Order_Line_Items__c > list1;
   public Order_Line_Items__c OrdlItem{Set;Get;}
    
    public bulkff(){
    Boxoptions=new list<SelectOption>();
    lineItemName=new set<String>();
       orderItemsList=new list<Order_Line_Items__c>();
       OrderLineItems();
       String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       }
     public void OrderLineItems(){
      Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : apexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
      
      orderItemsList = [Select Id, Name, Difference__c, Order__c, Quantity__c, Select_Box__c, Supplied_Quantity__c, Type__c from Order_Line_Items__c where Order__c=:Apexpages.currentpage().getParameters().get('id') AND Compare__c = 'false'];
        for(Order_Line_Items__c old : orderItemsList)
        {
            
           if(old.Select_Box__c== '' || old.Select_Box__c == '--None--' || old.Select_Box__c == null ){
           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));
          
        }
 
        }
     
     
}

public void refresh()
{
if(SelectedBox=='' || SelectedBox==null || SelectedBox=='--None--')
       {
       
           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));
     
       }
       
       
}
     public pagereference updatevalue()
    {
       if(orderitemslist.size()>0)
        {
            update orderitemslist;
            OrderLineItems();
        }
  return new Pagereference('/apex/orderView?id='+order[0].id).setredirect(true); 
}    
}




<apex:page controller="bulkff" sidebar="false" id="page" tabStyle="Orders__c">

  <html>

<title>Print Test Page</title>

 <style type="text/css">
   .outBorder {
    border:3px outset black;
   }
   .inBorder{
    border-top:2px inset black;
    border-left:2px inset black;
   }
    
  </style>
  
 
<script>

function printDiv(divId) 
{
       var result = document.getElementById('page:form:pb1:pbstbl:pbsi:sl').value;
        if (result == "--None--") 
            {
                alert("Please Select Box");
            }
            else{
  
        window.frames["print_frame"].document.body.innerHTML=document.getElementById(divId).innerHTML;
        window.frames["print_frame"].window.focus();
        window.frames["print_frame"].window.print();
        }      
  }  
</script>

<body>

</body>

    
    <script src="{!URLFOR($Resource.jQuery,'')}"/>
    <script type="text/javascript">
       var j$ = jQuery.noConflict();
       
      
           function focusme()
           {
               var inpele = j$("input[id$='xyz']");
               inpele.val("");
               inpele.focus();
           }
       
    </script>
  
    <apex:outputPanel id="errorpanel">
    <apex:pageMessages id="showMsg" />
    </apex:outputPanel>
    <apex:form id="form">
        <apex:pageBlock title="Bulk Fulfill" id="pb1" >
            <apex:outputpanel id="panel">
            
                <apex:pageBlockSection columns="1">
                
                   <apex:pageBlockSectionItem >
                        <apex:outputLabel >Choose Box to Save</apex:outputLabel>
                       
                    </apex:pageBlockSectionItem>
        <apex:selectList value="{!SelectedBox}" size="1">
                    <apex:selectOptions value="{!Boxoptions}"></apex:selectOptions>
                </apex:selectList>
                </apex:pageBlockSection>
                
                <apex:pageBlockSection columns="1" >
                 <apex:outputField value="{!order[0].name}"/>
                 <apex:outputField value="{!order[0].Location__c}" />
          
     <br/>
             </apex:pageblocksection>
             
               </apex:outputpanel>
      
    <apex:outputPanel id="tblpnl">
    <div id="itemsDiv">
  
     <apex:pageblockTable value="{!orderItemsList}" border="1" var="ord" id="theTable" rowClasses="odd,even" styleclass="outBorder" width="550px" rendered="{!orderItemsList.size>0}">
    
          <apex:column styleclass="inBorder">
             <apex:facet name="header">Subject</apex:facet>
              <apex:outputText value="{!ord.Name}"/>
         </apex:column>
        
        <apex:column styleclass="inBorder">
              <apex:facet name="header">Quantity</apex:facet>
              <apex:outputText value="{!ord.Quantity__c}"/>
        </apex:column>
        <apex:column styleclass="inBorder" >
            <apex:facet name="header">Supplied Quantity</apex:facet>
            <apex:inputText value="{!ord.Supplied_Quantity__c}"/>
            <apex:actionSupport event="onchange" action="{!refresh}" onbeforedomupdate="beep()"  reRender="pbstbl,xyz,errorpanel,pb1" oncomplete="focusme();"></apex:actionSupport>
        </apex:column>
    
       

  </apex:pageblockTable>
  
</div>
</apex:outputPanel>

   <apex:pageBlockButtons location="top">
   <apex:commandButton value="Save Value" action="{!updatevalue}"/>
   
   </apex:pageBlockButtons>             
           
   

        </apex:pageBlock>
    </apex:form>
    </html> 
</apex:page>

 
Hi,

I'm having a VF page with two fields Start Date & End Date.
Using date picker I'm getting the calendar, But the problem is when I open that page automatically Start date , End date values must be populated based on the current month.
For example: If I go to that VF page, as this month is september , start date must be 9/1/2016, End date must be 30/1/2016.
First date and Last date of the current month must be populated. 
Please help me
Hi,,
Can anyone help me to write test classes for below methods Please help me
public PageReference showPopup1()
    {    
       List<Student__c> str=[SELECT Id, Name FROM Student__c];
 pageReference pageRef = new PageReference('/apex/studentadmissionPage');

        pageRef.setRedirect(true);
        
       
        displayPopup = true; 
        
        return pageRef ;   
    
    }






      
    public void SubjectRegistered(){
    
         srsize = [select count() from Subject_Registered__c where Student__c =: subRegChangeDay.Student__c and Subject__c = : subRegChangeDay.Subject__c and Deactivated__c=false];
         if(subRegChangeDay.Subject__c == 'G.K')
         {
             stTime = false;
             enTime = false;
         }else{
         
             stTime = true;
             enTime = true;
         }
    }




    
    public integer getsizeofsr(){
        return srsize;
    }









    public PageReference closeChangeDay() {
            chnageDayFlg = false;
        return null;
    }

 
Hi,

My test class is not working please help me.
public  class google {

    public google(google1 controller) {

    }


    public google(ApexPages.StandardController controller) {

    }

public pagereference google() {
  return new pagereference('/apex/PlotGoogleMarker');
 
}

}







@isTest
public class googletest {
@isTest 
    static void test1() {
        PageReference ref = new PageReference('/apex/PlotGoogleMarker');
        Test.setCurrentPage(ref);
         ref = new PageReference('/apex/PlotGoogleMarker?id=');
        Test.setCurrentPage(ref);
        System.assertEquals('/apex/PlotGoogleMarker?id=recordId',Ref.getUrl());
    }
}

 
Hi,

In my organization for 5 users their passwords should not be expire forever, for remaning users it should be expired for 1 month. Please help me out of this.
public pagereference refresh()
    {
       if(SelectedBox=='' || SelectedBox==null || SelectedBox=='--None--')
       {
       
           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));
     
       }  
       
     else   
       if(WrapperMap.containsKey(reccode) && WrapperMap.get(reccode).OrdlItem.Quantity__c >=WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c)
       {
                if(WrapperMap.get(reccode).OrdlItem.Quantity__c == WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c){   
                          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'supplied quantity exceeded'));
                
                    PageReference sound = new PageReference('/apex/sound');
                    sound.setRedirect(false);   
                    
                }
                else
                    WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c+=1; 
                   
                    
                if(changedItemIds.add(WrapperMap.get(reccode).OrdlItem.Id))
                {
                    Order_Line_Items__c Ordlt=WrapperMap.get(reccode).OrdlItem;
                      Ordlt.Select_Box__c = SelectedBox;
                     UpdatedOrderLineItem.add(Ordlt);  
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Confirm,'Quantity Added'));
                    
                    
                }
        }
       else
          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'item not matched')); 
      
 PageReference sound = new PageReference('/apex/sound');
  sound.setRedirect(false);
  return null;
    }

 
Hi,

I'm adding apex:outputtext values into variable to compare , but unable to execute please help me
 
<script>
 function sound()
            {
                var i= '{i.OrdlItem.Supplied_Quantity__c.size()}';
                var j ='{ord.Supplied_Quantity__c.size()}';
                if(i>j){
                    alert('value increased');
                }
</script>


    <apex:dataTable value="{!orderItemsList}" border="1" var="ord" id="theTable" rowClasses="odd,even" styleclass="outBorder" width="550px" rendered="{!orderItemsList.size>0}">

  </apex:column>
        <apex:column styleclass="inBorder" >
            <apex:facet name="header">Supplied Quantity</apex:facet>
            <apex:outputText value="{!ord.Supplied_Quantity__c}"/>
        </apex:column>


 <apex:pageBlockTable value="{!ListItem}" var="i">
<apex:column headerValue="Supplied Quantity">
                    
                  
                            <apex:outputText value="{!i.OrdlItem.Supplied_Quantity__c}" />

 
Hi Every one when I'm adding success message  Supplied quantity, it should be in the same page but sound must be produced, Could any one please help me. when im adding quantity its going to sound page
public with sharing class OrderFulfill {

    map<string, string> lineItemNameMapWithQrcode=new map<String, String>(); // lineitemname, qrcode
    list<Order_Line_Items__c> UpdatedOrderLineItem=new list<Order_Line_Items__c>();
        list<Order_Line_Items__c> UpdatedOrderLineItem1=new list<Order_Line_Items__c>();

    set<String> changedItemIds=new set<String>();
    set<String> lineItemName{Set;Get;}
    public String reccode{get;set;}
    public String SelectedBox{Set;Get;}
    public list<WrapOrderLineitemWithQrcode> lineitemlist{set;get;}
    public List<Orders__c> order {get;set;}    
    List < Order_Line_Items__c > list1;
    public list<SelectOption> Boxoptions{set;get;}
    Public list<Order_Line_Items__c> orderItemsList{Set;Get;}
    
    public String olid{get;set;}
    public List<Order_Line_Items__c> olit{get;set;}
    
    Map<String, WrapOrderLineitemWithQrcode> WrapperMap=new Map<String, WrapOrderLineitemWithQrcode>(); // string is qrcode    

    
    public OrderFulfill(){
        Boxoptions=new list<SelectOption>();
        lineItemName=new set<String>();
        lineitemlist=new list<WrapOrderLineitemWithQrcode>();
        orderItemsList=new list<Order_Line_Items__c>();
        OrderLineItems();
        //lineItemNameMapWithQrcode=
        String boxnm='';
        Boxoptions.add(new SelectOption('--None--', '--None--'));
        for(integer i=1;i<=15;i++)
        {
            boxnm = 'Box '+i;
            Boxoptions.add(new SelectOption(boxnm, boxnm));
        }
       
    }
  
    public void OrderLineItems(){
    
        Set<id> oid = new Set<id>();
        List < Order_Line_Items__c > listOfItems = new List < Order_Line_Items__c > ();
        order = [SELECT name, Total_supplied_quantity__c, Location__c, From_Date__c, To_Date__c, id, Status__c, Submitted_On__c, SystemModstamp, Total_Quantity__c, Total_Units__c FROM Orders__c Where Id = : apexPages.currentPage().getParameters().get('id') ];
        for(Orders__c o : order)
        {
            oid.add(o.id);
        }
        
        /*list1 = [select id, name, Order__c, Quantity__c,Supplied_Quantity__c,Difference__c, Type__c from Order_Line_Items__c
        where Order__c = :order.id and Supplied_Quantity__c <= :0];*/
        list1 = [select id, name, Order__c, Quantity__c,Supplied_Quantity__c,Difference__c,Compare__c, Type__c from Order_Line_Items__c
        where Order__c IN :oid AND Compare__c = 'false' and Type__C = 'subject'];

        
        for (Order_Line_Items__c oli: list1) {

            listOfItems.add(oli);
            lineItemName.add(oli.name);
            
        }
        for(QR_Codes__c qr: [Select Id, QR_Code__c,Name from Qr_Codes__c where name in: lineItemName]){
            lineItemNameMapWithQrcode.put(qr.name, qr.qr_code__c);
        }        
        for(Order_Line_Items__c oli: listOfItems)
        {
            if(lineItemNameMapWithQrcode.containskey(oli.name)) 
            {
                lineitemlist.add(new WrapOrderLineitemWithQrcode(lineItemNameMapWithQrcode.get(oli.name), oli));
                
            }
            
        }
        for(WrapOrderLineitemWithQrcode w: lineitemlist){
            WrapperMap.put(w.qrcode, w);
        }
    }
    public list<WrapOrderLineitemWithQrcode> getListItem()
    {
        return WrapperMap.values();
    }
    public pagereference refresh()
    {
         //reccode='';
       if(SelectedBox=='' || SelectedBox==null || SelectedBox=='--None--')
       {
       
           ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select Box to save'));
     
       }  
       
     else   
       if(WrapperMap.containsKey(reccode) && WrapperMap.get(reccode).OrdlItem.Quantity__c >=WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c)
       {
                if(WrapperMap.get(reccode).OrdlItem.Quantity__c == WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c){                
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'supplied quantity exceeded'));
                    return null;
                }
                else
                    WrapperMap.get(reccode).OrdlItem.Supplied_Quantity__c+=1; 
                    
                if(changedItemIds.add(WrapperMap.get(reccode).OrdlItem.Id))
                {
                    Order_Line_Items__c Ordlt=WrapperMap.get(reccode).OrdlItem;
                      Ordlt.Select_Box__c = SelectedBox;
                     UpdatedOrderLineItem.add(Ordlt);
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Confirm,'Quantity Added'));
                      PageReference errorPage = new PageReference('/apex/sound');
                      errorPage.setRedirect(false);
                     return errorPage;
                }
        }
       else
          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'item not matched')); 
      
return null;
       
    }
    
   
    public PageReference updateme()
    {
        //refreshme();
        
        if(UpdatedOrderLineItem.size()>0)
        {
            update UpdatedOrderLineItem;
            OrderLineItems();
        }
       return new Pagereference('/apex/orderView?id='+order[0].id).setredirect(true);
        //return null;
    }
    public class WrapOrderLineitemWithQrcode
    {
        public string qrCode{Set;Get;}
        public Order_Line_Items__c OrdlItem{Set;Get;}
        public WrapOrderLineitemWithQrcode(String qrCode, Order_Line_Items__c OrdlItem)
        {
            this.qrCode = qrCode;
            this.OrdlItem = OrdlItem;
        }
    }
    
}