• vikas88
  • NEWBIE
  • 30 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 10
    Replies

I have a VisualForce page that has three functionalities,

Hence it has three 'public PageReference' subroutines,

That are called when an action happens in the page [i.e. button]

 

One of the functionalities requires user input [i.e. inputText],

So the main APEX code has a variable declaration for that input:

 

    public String UserInput { get; set; }

 

Since each task is not really related,

When I hit the button on the other two functionalities,

I get a VisualForce error, Because the inputText object has no user input,

 

How can I prevent that from happening,

 

Another way to solve this,

How do I turn off VisualForce Error messages?

So I can do error handling from APEX,

Looking at the debug log file,

The error is in VisualForce NOT APEX,

 

Thanks

Hi,

 

 

Can anybody tell about radian6 in salesforce?

 

How i start radian6 in salesforce?

 

what is merits and demerits for radian6 in salesforce?

pPublic CreateAcc(){
   accountID = '';
   account = new account();
 }
 
 Public void JoinAcc(){
  If (accountID.trim()!=''){
  list<account> acclist = new list<account>();
  acclist = [select id,name,BillingCountry,BillingState,Account_Type__c,Account_ID__c from account where Account_ID__c = :accountID];
account =acclist[0];
   
 
 }

Hi All

 

         How do I Login as a Contact's Portal User using Force.com SiteLogin page?

 

Regards

------------

VenkatSforce

 

  

I have a VisualForce page that has three functionalities,

Hence it has three 'public PageReference' subroutines,

That are called when an action happens in the page [i.e. button]

 

One of the functionalities requires user input [i.e. inputText],

So the main APEX code has a variable declaration for that input:

 

    public String UserInput { get; set; }

 

Since each task is not really related,

When I hit the button on the other two functionalities,

I get a VisualForce error, Because the inputText object has no user input,

 

How can I prevent that from happening,

 

Another way to solve this,

How do I turn off VisualForce Error messages?

So I can do error handling from APEX,

Looking at the debug log file,

The error is in VisualForce NOT APEX,

 

Thanks

when a user enter values in  fields in the form and save ,it is sending  a link in email to the approver. when the approver clicks that link,it should redirect him to the detail page of the corresponding record to approve.How to create the "Link " ?

Hi,

 

can u give me  any  one example of extension to the customcontroller  ?

 

  • August 12, 2013
  • Like
  • 0

Is there any way to increase  number of callouts to an HTTP request or an API call ?

  • August 12, 2013
  • Like
  • 0

Hi,

 

how to convert time from gmt to local time zone?for ex:lastmodifieddate displays in GMT time zone if i want to display in local time zone how i will display?can anybody help me?

 

 

 

Thanks,

Isha

 

 

 

 

 

 

Hi,

 

I made a batch apex that updates / gathers information with SOQL, and now I'm creating a trigger that calls for the batch. It looks like this, but I'm not sure how should I build it and how it works. Should I make a method to an existing trigger class or create a new one? It's giving me these errors : Invalid identifier: objBatchToUpdateService_Availability__c_Type

 and Invalid bind expression type of SOBJECT:Service_Availability__c for Id field of SObject Case

 

trigger ImplementingServiceAvailabilityUpdaterTrigger on Service_Availability__c (before update) {

 Set<Id> SetCaseId = new Set<Id>();
 for(Case objCase: [Select Id from Case where Id in : Trigger.new])
 {
  SetCaseId.add(objCase.Id);
 }
 if(!SetCaseId.isEmpty())
 {
  string query='select Id, Fault_Classification__c, Setup_Name__c,'+ 'CaseNumber,Related_Setup__c,Status_Explanation__c '+
        'from Case '+
        'where RecordTypeId ='+ recordType.Id+
        ' and IsClosed = false'+
        ' order by CreatedDate desc';
        
  BatchToUpdateService_Availability__c_Type objBatchToUpdateService_Availability__c_Type=new BatchToUpdateService_Availability__c_Type(query);
  Database.executeBatch(objBatchToUpdateService_Availability__c);
 }
}

 

 

Thanks for helping! :)

 

  • August 12, 2013
  • Like
  • 0

Hi,

 

I am unable to display page message in my vf page.

 

the following is the code.

<apex:page controller=" xyz">

<apex:outputPanel id=panelid>

</pageMessages>

<apex:commandlink action="{reference}" value=" save and send" rerender="panelid">

</apex:outputPanel>

 </apex:page

-----------------------------------------------------------------------------------------------

controller code

public pagerefernce reference(){

       set<string>  emails = new set<string>();
        /checkValid EMails
       for(String e :emails){
        checkEmail(e);
        if(isValid(e)){
        system.debug('check email is not completed calledcccccc');  
        ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Check your email');
         ApexPages.addMessage(myMsg);  
        }
       }
       
       if(vEmails.size()==eMessage.size()){
          ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'At least one email is mandatory'));
       }

     
       
        for(ApexPages.Message message : ApexPages.getMessages()){
        System.debug(message.getComponentLabel() + ' : ' + message.getSummary());
        }
        
      return null;
    }
    
    //validate Email
  
    
    public  boolean isValid(String email){

// Regular Expression for email
String emailRegex =  '^[_A-Za-z0-9-+]+(\\.[_A-Za-z0-9-+]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$';

Pattern MyPattern = Pattern.compile(emailRegex);

// then instantiate a new Matcher object ”MyMatcher”
Matcher MyMatcher = MyPattern.matcher(email);

if (!MyMatcher.matches()) {
return true;
}else{
return false;
}
}

 

Thanks & Regards