• Subha Ayyappan 7
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies
Hi ,
I need  help in ordering the List. I have a List where the Field Priority__C must be ordered as Primary,Secondary, Tertiary,Fourth,Fifth,Sixth etc.. This order is in another List if Strings. 
The user can change the priority of the record, and after resequencing the priority the order must be same again as Primary, Secondary etc...
I tried ORDER BY Id. But when the priority is changed the Id remains same and so not able to get the ordering.
Please help.
Can anybody help me solve this issue?
I want to check if the user selects duplicate value of the picklist when many records are displayed to edit and show the error message and stop if duplicate is found.
I wrote a apex method for the same. Now how to take the return value to check the condition to show the error message in javascript?
My apex method is :
public Integer getcheckDuplicate() {
       // RequestsList = new List<Reclassification_Request__c>();
        
        
        for(integer i=0 ; i<RequestsList.size();i++) {
             system.debug('Entering First For Loop');
            for( integer j=(i+1) ; j<RequestsList.size() ;j++) {
                Reclassification_Request__c reclassreqI = RequestsList.get(i);
                system.debug(reclassreqI);
                Reclassification_Request__c reclassreqJ = RequestsList.get(j);
                system.debug(reclassreqJ);
                if(reclassreqI.Request__c != 'Other') {
                    if(reclassreqI.Request__c == reclassreqJ.Request__c) {
                        system.debug('Duplicate Found');
                       // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'Error:Priority may not be duplicated.'));         
                        ErrorCount =  ErrorCount+1; 
                                                 
                    } 
                }            
            }
        } 
        return ErrorCount;          
      }

I want the check the value of ErrorCount and show the error message. But the value is always 0. Why? Any help please...
Can anybody help me to write a javascript to check "if the field is blank in a visualforce page" and show the error messages below the field itself? I am new to javascript and not knowing how to write the JS code. Thank you.
I am new to salesforce and i face a problem.
My problem is I want to redirect to the same visualforce page when New and Edit button is clicked from another Vf page.
Is it possible to change the Page Heading as "Add Request" when clicking Add and "Edit Request" when clicking Edit button? Please help
Hi all,
I want to get the records of an object created in a day, week and month all in the same query. Is it possible?