Clarity

  • 1.  Lock - Unlock attributes

    Posted Dec 22, 2009 11:11 AM
    We have processes in place to lock and unlock fields based on the user activitiy.Is there a way to lock/unlock these fields using a query? I am trying to see if we run in to any issues and need to manually reset the fields.  What would be our options?    Thank you.  


  • 2.  Re: Lock - Unlock attributes
    Best Answer

    Posted Dec 22, 2009 04:43 PM
    Hi,             You can lock ot unlock the attributes based on query. we have implemented this in our organization for requisition object by process level using GEL Script. Gel  Script is below which we have implemented in our organization    Gel Script:    Unlocked Attributes
    ===================    
     DELETE FROM ODF_LOCKED_ATTRIBUTES WHERE OBJECT_CODE = 'requisition' AND ODF_PK='${gel_objectInstanceId}'  locked attributes:
       
       

          SELECT CREATED_BY CRE_BY1 FROM RSM_REQ_REQUISITIONS WHERE ID=${gel_objectInstanceId}              
                  ${CREBY1.rows[0].CRE_BY1} 
          INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'intmat_pref',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})
          INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'rmg_internalmatch',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})
          INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'local_grade',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})      INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'office_address',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})  
          INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'approved_resource',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})
          INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'attach_file',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})
     -------------------------------------------------------------------------------------------------------   Lock Attributes:   INSERT INTO ODF_LOCKED_ATTRIBUTES VALUES(ODF_LOCKED_ATTRIBUTES_S1.nextval,'requisition',${gel_objectInstanceId},
          'intmat_pref',SYSDATE,${CRE_BY1},SYSDATE,${CRE_BY1})   Unlock Attributes:   DELETE FROM ODF_LOCKED_ATTRIBUTES WHERE OBJECT_CODE = 'requisition' AND ODF_PK='${gel_objectInstanceId}'   and attribute_code='local_grade'    ThanksSenthil    


  • 3.  Re: Lock - Unlock attributes

    Posted Dec 23, 2009 04:33 AM
    Thank you Senthil. This helps.


  • 4.  RE: Re: Lock - Unlock attributes - resource

    Posted Oct 28, 2013 11:24 AM

    Hello,

    We have implemented a trigger (few years ago) for locking a custom attribute on the resource object and it has been working fine. We are in V13 (13.0.1.0102 02 0023) and noticied that the lock is not working anymore. The trigger is inserting row in to odf_locked_attributes, still attribute is not getting locked. I am wondering if there are any changes in the current version to prevent the locking behavior. (Resource object does not have process option)

    Thank you,

    Rajani.

     



  • 5.  Re: RE: Re: Lock - Unlock attributes - resource

    Posted Sep 25, 2014 10:07 AM

    Have you tried to lock a custom field in the Team object?

     

    My goal is to lock a custom field in the odf_ca_team table for a particular Idea instance.  So, I want to lock a single custom field for the Idea team.  Its not locking an attribute for the Idea object or the Team object directly so I am struggling with the code?  I have you tried to lock a custom field for a master object (team) for a particular Idea instance?