Hi guys in production order list form my user face proplem .released productions order is more and show when he make consumption to material from consumption journal(Manufacturing - execution-consumption journal- function -calc consumption-No-Production Order List) it show all released production order. so that i decided to hide all exception last one.
because it some times it select wrong released order and this make problem for dynamic in my company.
so that in form of production order list in open form trigger i write this code but not affect
ProdOrder.RESET;
ProdOrder.SETRANGE(Status,ProdOrder.Status::Released);
ProdOrder.SETRANGE(“No.”,“No.”);
IF ProdOrder.FIND(’+’) THEN
ProdOrder.MARK(FALSE) ;
i make code as above to show only last record and hide any record released before it but all records show why.what is wrong in this code please help me
thanks
You want to show only last record, and not the released one’s.
Why have you setrange on No. ?
Use Markedonly after the code.
ProdOrder.RESET;
ProdOrder.SETRANGE(Status,ProdOrder.Status::Released);
IF ProdOrder.FIND(’-’) THEN
ProdOrder.MARKEDONLY(TRUE) ;
and i tested also as false but not work why
WHAT I need is show last record released only in production order list
i write this code as above but no result i show all displayed
and ProdOrder is global variable record to production order table
Rather than customizing the system, you can simply post consumption and output directly from Released Production Order form–>Line–>Production Journal
I thanks you for this way.can you give me solution for customization as above if possible.what wrong in the code above
please help me because there are more situation depend on show last record i cannot do.
Rec.RESET;
Rec.SETRANGE(Status,Rec.Status::Released);
//Rec.SETRANGE(“No.”,“No.”); Use only if you want to show specific record.
IF Rec.FIND(’+’) THEN
Rec.MARK(TRUE) ;
MARKEDONLY(TRUE);
Try this.
I thanks for interest.the code you send to me i tested it hide all records
what i need is hide all records exception last one(ex)
5 released
6 released
7 released
if this values found in production order table show only
7 released
showing last records only
The code what I gave you have been tested on customer card on location code=blue only & it shows me the last record.
Form - OnOpenForm()
RESET;
SETRANGE(“Location Code”,‘Blue’);
IF FIND(’+’) THEN
MARK(TRUE);
MARKEDONLY(TRUE);
OK thank you very much mohana,Manaish
Hi ahmed salah,
Did you ever find a solution to your problem? If you did, would you mind sharing it with us and if any of the posted answers helped you on the way, then please verify them.
Thank you.