Skip to main content

We are using IFS version 8.While creating sales part we need to mention sales part no and inventory part no .If Inventory part is present i.e. already created in system  them user connecting this inventory part with sales part and saves the screen but if inventory part is not present in system then also user can created sales part by mentioning inventory part in part no and when he saves the screen sales part along with inventory part getting created.

I need to restrict user for creating new inventory part if it does not exits in system.

Please provide me pointers regarding this scenario.

Thank You

Deepak Navale.

@paul harland  can you help ….!!!


hi Deepak

You can try and do it via permission sets.  I’m not sure whether this will work or not.  For this group of users, revoke the permission Inventory_Part_API.New__ (on the permission set/database objects tab) and then see if they get an error message (insufficient privileges or some such).

Failing that, you would need to do it using a custom event based on INVENTORY_PART_TAB


Dear @paul harland 

We are using Oracle 11g Wherein I have created one trigger to restrict the user but what happned last week when user was creating sales part where Inventory part is already present in system then also this trigger get fired and retricting user to create the sales part.So I have disabled this trigger.Please find the trigger logic:-

**********************************************************************

CREATE OR REPLACE TRIGGER INVNETORY_PART_05082020
BEFORE INSERT ON sales_part_tab
FOR EACH ROW

when (NEW.CONTRACT='PPR01' AND NEW.Catalog_Type='INV')
DECLARE


CURSOR C1 IS
SELECT COUNT (*)
FROM sales_part_tab
WHERE contract='PPR01'
AND  PART_NO =:NEW.PART_NO ;


cnt_ NUMBER;

BEGIN

      OPEN C1;
      FETCH C1 INTO cnt_;
      CLOSE C1;
      IF NVL(CNT_,0) = 0 THEN
      ERROR_SYS.RECORD_GENERAL('SalesPart','ERRORINVPART: Inventory Part not present in system . Please check with admin. Error Through trigger INVNETORY_PART_05082020.',:NEW.PART_NO );
      END IF;

END;

*********************************************************************************************

Please suggest if there is any ambiguity in this trigger code.

Thanks & Regards

Deepak Navale

 


With this kind of approach, the trigger would need to be on the inventory_part_tab, not sales_part_tab.  

However, I don’t think you’ll be able to use the cursor in that way.  Sales Part tab will be locked while processing inventory part tab.

 

 


Reply