• Discussion
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hello,

 

I've implemented a scheduler, but I would like to be able to specify and end data as part of my cron parameter request.  Currently I have the following set

 

System.schedule('SEO Project Renewal Reminder', '0 0 3 ? * MON-SUN', new SEO_Project_Renewal_Reminder());

 When I go to view the added scheduled job, there is not end date set and it seems that the end date field is required.

 

questions:

 

1) Is the end date field needed for it to work?

2) How can I specify an end date in my cron parameter?

 

thanks,

 

Mirko

Hello, 

I have to implement a delete functionality in my trigger. 

trigger is on the child object of the account.

in this trigger when any record on the child object is created then it gets updated on the main Parent account  object. now is there any way by which when the same record gets deleted from the child object  it should be deleted from the parent account also

Please find my trigger below

trigger ABC on ChildObject (after insert,after delete) {
    
Set<Id> accId = new Set<Id>();
//Map<Id,Account> IdValues = new Map<Id,Account>();

if(trigger.isinsert)
{

for(ChildObject  CO : trigger.new)
    {
      accId.add(CO.ChildObject ID);
    }
    
    Map<Id,Account> IdValues = new Map<Id,Account>([select id, Industry__c from Account where id in:accId]);
    if(trigger.isinsert){
    for(ChildObject  CO : trigger.new)
    {
   
      string strInt=IdValues.get(CO.ChildObject ID).Industry__c;
      IdValues.get(CO.ChildObject ID).Industry__c=(strInt==null?'':strInt) +';'+ CO.Industry__c;
      
    }
    
    update IdValues.values();
}
}/*

if(trigger.isdelete){
 
 for(ChildObject  CO : trigger.old)
   {
   
   <delete functionality >
      
   
   }
   }
}

  • December 06, 2011
  • Like
  • 0

I have a simple search box that runs a method and rerenders part of the page. I want the User to hit enter in this box and have the search happen correctly. My method is running when the User hits enter, but the search always turns up zero results. If the User hits the Search button, the search runs correctly.

 

 

<apex:form >

<apex:inputText value="{!searchText}" id="searchText"/>

<apex:commandButton action="{!search}" rerender="searchresults,selectedContacts,winnerpanel" value="Search" status="searchStatus"/>

<apex:actionStatus startText="(searching...)" id="searchStatus"/>

</apex:form>

 My controller code looks like this:

 

public String searchText { get { return searchText; } set { searchText = value; } }

 

public void search() {

if(searchText.length()>0){

//reset booleans that control display of results elements

displaySelected = false;

successfulMerge = false;

displaySearchResults = false;

mySOSL();

searchResults = wrapSOSLResults(searchList);

//if we got a result back, show the search results pane

if(searchResults.size()>0){

displaySearchResults = true;

}

}

}

 

 

The mySOSL method constructs a search string using the value in searchText. Any ideas why this would return no results when hitting enter on the form? It feels like the setter for searchText isn't running...but I'm not sure how to remedy that.

 

Thanks,

 

Steve