This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Prevent updating Part BOM

sherenegladysj - Thursday, February 3, 2011 8:16 AM:

Hello, I want to prevent the user(except Admin) from deleting the Part BOM without approved ECN. As well as the Quantity and Reference_Designator fields (properties of BOM) should also be non editable. Individual parts should be editable but not BOM.

Thanks,Sherene



Brian - Sunday, February 6, 2011 7:21 AM:

Hi Sherene,

When the Part is Released by an ECN it goes into a lifecycle state where it can't be edited at all (the part or the Part BOM etc). Only when you create an ECN and add this part to it again and move the ECN to "Update Documents" can the Part and BOM be edited.

So the basic process is to release your parts.

You may also want to put another Permission on the Relationship Item Type "Part BOM" to allow only the Administrator to edit it regardless of what state it is in.

You could also write a method on the Part BOM relationship type - Grid Events - to intercept anyone trying to add or delete a Part BOM entry. Look for the onInsertRow and onDeleteRow methods, even the onSelectRow. If you don't want people to add, remove or edit a row then just return false from these events. It cancels the event. So you could test for the user and if you don't want them doing anything then return false, otherwise just return and let them continue.

Hope this helps,

Brian.