• CloudLearner
  • NEWBIE
  • 5 Points
  • Member since 2010

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

Hi,

 

I'm having a problem with a trigger that is run when a Self-Service Portal user adds an attachment to a case.

I would like to know if there is anyway to set a debug log for this event because setting it up for the Administrator doesn't show any record and I couldn't find a way to set it up for the Portal user.

 

Thx

  • July 20, 2010
  • Like
  • 0

Hi all -


I'm struggling with how to set a date field to today() using a custom button's on click javascript.

 

I'm using the button to set the value of two picklist values, set a date field to Today() and set a second date field to Today()+180.

 

When I first wrote it and tested it earlier in the week, it was executing but was setting the wrong dates. Today it just errors out.

 

 

{!requireScript("/soap/ajax/13.0/connection.js")} var QR= new sforce.SObject("Quote_Request__c"); QR.id = "{!Quote_Request__c.Id}"; var temp_dev_date=new Date(); temp_dev_date.setDate({!TODAY()}) var temp_val_date=new Date(); temp_val_date.setDate({!TODAY()}+180) QR.Delivered_Date__c=temp_dev_date; QR.Validity_Date__c=temp_val_date; QR.Customer_Requirements__c="Test update of auto close button."; QR.Status__c="Closed - Completed"; QR.Stage__c="Delivered"; var result = sforce.connection.update([QR]); if (result[0].getBoolean("success")) { // Refresh window window.location.reload(); } else { alert("something broke"); }

 

Appreciate any guidance or other approaches that could be used to accomplish this.