• Jocsan
  • NEWBIE
  • 25 Points
  • Member since 2006

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I have a page layout containing fileds from custom object and I need to show or hide certain fields on this page layout based on the selection of the drop down list.
 
Is there a way I can assign a trigger to my drop down list to triggere some code tha will go through my fields and hide them?
 
I would really appreciate if someone gives some insights and pointers on that request.
 
Thank you.

Hi,

 

I am getting this error message when running this query:

 

System.TypeException: Invalid date/time: Mon Jan 26 00:00:00 GMT 2009

 

System.debug(item.Start_Date__c);

myStartdate = datetime.valueOf(item.Start_Date__c);

myExpirationdate = datetime.valueOf(item.Expiration_Date__c);

 

 

Job_Posting_History__History[] jphh_items = [SELECT Id, CreatedBy.Id FROM Job_Posting_History__History WHERE (CreatedBy.ProfileId = '00e30000000mHRJ') AND (Field = 'Cross_Posted_to__c') AND (Parent.Id = :jphid) AND (CreatedDate > :myStartdate) AND (CreatedDate < :myExpirationdate) ORDER BY CreatedDate DESC];

 

 Here is piece of the System Log:

20090127223506.172:Class.Check_Package_Inventory_Cross_Posting.checkRHW_Package: line 30, column 21: 2009-01-26 00:00:00
System.TypeException: Invalid date/time: Mon Jan 26 00:00:00 GMT 2009

I have run out of ideas. Please help!

 

JD

 

  • January 27, 2009
  • Like
  • 0
Hi,

I am using the following code and myAcct.Type is returning null. Why? I am able to update the Type field but I can't read it.

    for (opportunity o : Trigger.new) {
       
        String accountid = o.AccountId;
        Account myAcct = new Account(Id = accountid);
        System.debug(myAcct.Type);
       
        if ((o.StageName == 'Closed Won') && (myAcct.Type != 'Customer')) {           
            myAcct.Type = 'Customer';
            update myAcct;
        }   
    }

Any idea?

Thanks, Jocsan

Hi,

 

I am getting this error message when running this query:

 

System.TypeException: Invalid date/time: Mon Jan 26 00:00:00 GMT 2009

 

System.debug(item.Start_Date__c);

myStartdate = datetime.valueOf(item.Start_Date__c);

myExpirationdate = datetime.valueOf(item.Expiration_Date__c);

 

 

Job_Posting_History__History[] jphh_items = [SELECT Id, CreatedBy.Id FROM Job_Posting_History__History WHERE (CreatedBy.ProfileId = '00e30000000mHRJ') AND (Field = 'Cross_Posted_to__c') AND (Parent.Id = :jphid) AND (CreatedDate > :myStartdate) AND (CreatedDate < :myExpirationdate) ORDER BY CreatedDate DESC];

 

 Here is piece of the System Log:

20090127223506.172:Class.Check_Package_Inventory_Cross_Posting.checkRHW_Package: line 30, column 21: 2009-01-26 00:00:00
System.TypeException: Invalid date/time: Mon Jan 26 00:00:00 GMT 2009

I have run out of ideas. Please help!

 

JD

 

  • January 27, 2009
  • Like
  • 0
I have a page layout containing fileds from custom object and I need to show or hide certain fields on this page layout based on the selection of the drop down list.
 
Is there a way I can assign a trigger to my drop down list to triggere some code tha will go through my fields and hide them?
 
I would really appreciate if someone gives some insights and pointers on that request.
 
Thank you.
Hi,

I am using the following code and myAcct.Type is returning null. Why? I am able to update the Type field but I can't read it.

    for (opportunity o : Trigger.new) {
       
        String accountid = o.AccountId;
        Account myAcct = new Account(Id = accountid);
        System.debug(myAcct.Type);
       
        if ((o.StageName == 'Closed Won') && (myAcct.Type != 'Customer')) {           
            myAcct.Type = 'Customer';
            update myAcct;
        }   
    }

Any idea?

Thanks, Jocsan