• fjw07039
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I have an application with a transaction record that has a lookup field to an employee object.  The name field in the employee object is the employee id.  We'd like to create our own lookup search page that allows the user to enter the employee name instead of the id.  This is similar to the filter functionality only it would be the initial search.  We know how to customize the lookup page but we would like to add a button, similar to the lookup icon, to the edit page to invoke our custom code.  Unlike display pages, it does not appear that you can embed a piece of Visualforce code on an edit page.  Do we really have to recreate the entire edit page in Visualforce or are we missing something?

We are developing a new application for internal use with record level security needs that appear beyond the base functionality of roles and profiles.  The users belong to groups which are associated with one or more departments.   The groups either explicitly permit or restrict access to employee data for those departments.  The groups do not fit in a hierarchical structure which precludes using roles.  At any given time there are 1,000-1,500 departments with any one user having access to 100 or more departments.  Since we are using custom objects, the direction we were thinking of was to use Visualforce to control the page layouts and only allow the user to display and/or edit records for a department that is part of the group that the user belongs to.  Has anyone had a similar need?  What approach did you take?  Do you see any pitfalls with how we are looking to tackle this? 

 

Example –

Group A can access departments 1, 2, 3

Group B can access departments 3, 4, 5