You need to sign in to do that
Don't have an account?
Don Wanigasundara
Help with writing a trigger on a custom object that detects duplicates and resets the trigger every 24 hours.
I am trying to write a trigger on a custom object that detects duplicates and resets the trigger every 24 hours. Custom object has a lookup field that looks up accounts, I want to make sure users dont select the same account and apdate the same account within a 24 hour period as I use this object as data collection tool.
You can replace line 24 with whatever code you want to do
All Answers
If this doesn't help you, please include an example workflow with your object (and it's field names). And hopefully with that information we can get a clearer picture of what you are trying to accomplish.
[1] http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm
SELECT CreatedDate,Facility__c FROM Boiler_Percentage_Report__c
WHERE BPR_Date__c = today
You can replace line 24 with whatever code you want to do
@isTest
public class DupeCheckerTest {
static testMethod void BPRCreator() {
Boiler_Percentage_Report__c acc = new Boiler_Percentage_Report__c();
acc.Facility__c = 'test3';
acc.Number_Boilers_that_are_down__c = 1;
insert acc;
}
}