• megaleg1389
  • NEWBIE
  • 0 Points
  • Member since 2010

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

I'm having a hard time getting my brain around a new trigger I'm trying to write:

 

Business Case: Users add Weekly Notes (a custom child object to Opportunities) records to Opportunities every week ahead of a weekly meeting on Tuesdays.  The users should not be able to revise their notes after the meeting, but should have to log a new record.  Note: I have a custom formula date field that identifies the next Tuesday's date from the Created Date.

 

Issue: I want to lock a record from editing after a specific date and time: local midnight before Tuesday's meeting.  This also needs to happen with no action on a user's part to trigger the update.

 

Ideas on how to handle this?  I already have one formula field to calculate the date of the next Tuesday meeting, and I have located a simple trigger to identify a user's local midnight here.

 

Thanks!

I'm having a hard time getting my brain around a new trigger I'm trying to write:

 

Business Case: Users add Weekly Notes (a custom child object to Opportunities) records to Opportunities every week ahead of a weekly meeting on Tuesdays.  The users should not be able to revise their notes after the meeting, but should have to log a new record.  Note: I have a custom formula date field that identifies the next Tuesday's date from the Created Date.

 

Issue: I want to lock a record from editing after a specific date and time: local midnight before Tuesday's meeting.  This also needs to happen with no action on a user's part to trigger the update.

 

Ideas on how to handle this?  I already have one formula field to calculate the date of the next Tuesday meeting, and I have located a simple trigger to identify a user's local midnight here.

 

Thanks!

I have created an apex trigger in my developer edition of salesforce, and now I need to deploy/package it and install it onto my company's professional edition.

 

First of all, I believe it is possible but not 100% sure. I've been searching around, and it seems like apex triggers can be packaged and installed on professional edition but need to pass a security test or something. Can anyone fill me in on this or point me to something that explains it?

 

Also, assuming it is possible I have a few questions. The trigger that I made works on a custom object as well as a built in object (case) with custom fields added. The custom object and fields already exist in my company's professional edition. How will that work? When I tried to use the deply option in eclipse with the force.com plugin, I noticed that it gave me the choice to remove the action to overwrite the custom objects, but when I created the (unmanaged) package it didn't give me any similar options. Will the package automatically detect if the dependencies already exist or will it overwrite the objects (I would like it to NOT overwrite)? I did not recreate the custom object exactly as it is in my company's instance, just the fields that are needed in the trigger.

 

Thanks for any help.