• Ashley Shealey
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
I am looking for a simple solution to track when a custom url field is clicked on a record. I have a custom object with several URL's (URL Fields with default values) that link to Documents that also reside in Salesforce. I would like to track when a user clicks the link and reads the document. Any suggestions?
I currently have a trigger that checks a box when an attachment is added to a custom object called "Contracts__c". I would like to expand this Trigger to only check the box if the actual attatched document includes certain keywords. Is this possible? Here is my current code:

trigger CountAttachment on Attachment (before insert, before delete)
{
if(trigger.isinsert){
List<Contracts__c> co = [select id from Contracts__c where id =: Trigger.New[0].ParentId];
If(co.size()>0)        
{            
co[0].Contract_Attached__c = True;            
update co;        
}
}


if(trigger.isdelete){

List<Contracts__c> co = [select id from Contracts__c where id =: Trigger.old[0].ParentId];        
If(co.size()>0)        
{            
co[0].Contract_Attached__c = false;            
update co;        
}
}
}
Hi, 
I have created a trigger and I now testing it from a test class. 
Something is going wrong and I would like to figure out what. 
I am using the salesforce developer console.
I have put system.debug messages in strategic places in the test class and in the trigger itself.
non of them of showing on the logs tab.
I am sure that there is something simple that I am missing. 
Please advice, 
Thank, 
Aidel
Hello!

I have Salesforce Enterprise. I have downloaded Eclipse SDK. 

I am looking to create a trigger for when a document is uploaded, it will trigger a check box in Contact (or another object if it's easier?) that a document uploaded. It would be even greater if it updated a text box with the date the document was created.

I have two documents, a 1) Policy form and a 2) Contract form. When a Policy form is uploaded via a form into Notes and Attatchments, I would like a box to EITHER check or have the date created appear. I would like to differentiate this form with the Contract form. Is this possible?

So

Policy form uploaded --> Date updated
OR
Policy form uploaded --> box checked

...Really whichever is easier to do!

Thanks so much.

Best,
Lynn
This makes absolutely no sense to me. I am trying to insert two OpportunityLineItems that are exactly the same but I get this exception. What good reason is there to stop the insertion of two Records that are the same?

I understand if this was an upsert operation as you can't insert and update and the same time but I am inserting two brand new OpportuntiyLineItem records.

Thanks,
Jason


Message Edited by TehNrd on 09-24-2008 04:48 PM