Trigger / Script

Jun 28, 2007 3 Replies

Trying to automate a process - everytime we receive an item for a specific depart -we have to create two ILC - one for the item itself and another of a kit item.



ILC 19-123 original item Type Standard, etc...) ILC 19-123FQ - kit of ILC 19-123 Type kit, same taxes as original item, same department as original item, category always FQ, under KIT tab - select original item qty .25 build qty 2



Is their a way to automate this process via a script or trigger.



Danny


hi, Yes possible using the store procedure or database level trigger. but it require the detail analysis, i.e. what happen if you delete, what happen if you update the item, will it effect anywhere to kit item. Or whenever you add it will the kit auotmaitcally.

You let me know these answer I will try to produce a result for you by tommorow. H>

Hi Akber

I don't delete items or kits - so no change..

I was thinking a triger ON INSERT of ILC where department=xxx create ILC-fq as kit from ILC except department = FQ, itemtype = kit cost=cost/4, price = price/4

I would be happy if it just created the ILC - I could than go and built the kits if I had too... I have to built two kit items at a time each using .25 of original ILC quantity.

Danny

Hi Akber

I don't delete items or kits - so no change.. as for update no need for trigger - I will do does manually - doesn't happen often.

I was thinking a trigger ON INSERT of ILC where departmentúbric (#7)

create a new ILC ie: original ILC-fq as kit from ILC department = fabric (#7) Category = FQ (#22), itemtype = kit (#3 I believe) cost=original cost / 4, price = original price / 4, same taxid as original (#1), etc...

I would be happy if it just created the ILC - I could than go and built the kits if I had too... I have to built two kit items at a time each using .25 of original ILC quantity.

Danny

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required