Hi
can anyone pl. tell me how to select the items according to Item No.s??
Situation:
FG items have the code as--FG-0001
I want that if user selects any FG item on Purchase line...an error should be displayed.
what should i write on validate of No. in purchase line & purchase invoice line
0
Comments
Tetos
Avoid hard coding values like Item No. starts with specific charracters...
aliennav,
i would advice you to do as Kapamarou wrote either try to do hard code "inventory Posting Group" rather than particular item.
Hi Vijay....the solution seems to be good.
Thanks, but if I want to hardcode the restriction according to the item code, then what should be done???
I think it has to do something about the STRING...
no further idea.
if you want to hardcode the restriction according to the item code, then how will you decide what's item no. should be equal to purchase line item no. if not then according to you
whenever any user will make a PO the item in purchase line must be your hardcode item.
i means is the item that you are hardcoding should be eqaul everytime when PO make?
The Finished Goods are not supposed to be purchased as it is the manufacturing company.The code for FG items starts from FG----.
So I want to hardcode on "ONValidate" Trigger of the Purchase Line that :
IF Item.No = *@FG* THEN
ERROR('You cannot pick the FG item');
Now the problem is--> What should i write in place of *@FG* ?? because this type of filter we only use at runtime while searching (on list forms).
Not knowing the very basics of Navision is never a reason to just go and write some horrible code.
We can use setfilter instead of using condition
if item no.=*@FG* then
write code on onvalidate of item no.
setfilter(itemno,'%1','*@FG*');
if find('-') then
error('text001');
i think this may help u,But Hardcoded is not good to write .
Deepu..
http://www.BiloBeauty.com
http://www.autismspeaks.org
I think u have not read the word
"PURCHASE LINE".
FG items are used for sales.
Great advise Deepu, you have just shown him how to wreck the system and screw it up for the customer. Of course this will mean the customer paying more money to fix it later, but hey that's good news right.
](*,) ](*,) ](*,) ](*,)
http://www.BiloBeauty.com
http://www.autismspeaks.org
the attached table might be of help.