RE: Open Page in View Mode instead of edit mode when open from list page
Hello!
This is my first comment, because the company I work for had this same issue (older people working with two screens and didn't knew they were in the item card for example) and it's not very hard to do this. You do need a developer licence and development environment at your disposal
Just make a function in a codeunit (for example 50000) and name it DoubleClickView.
Property Local to 'No'
Parameter RecordRef (i've named my parameter pRecRef)
Locals:
Record: Customer (I've named mine lRecCustomer)
Record: Vendor (I've named mine lRecVendor)
Record Item (I've named mine lRecItem)
You can add more records for every listpage you want to open as View instead of editable
Add following code:
CASE pRecRef.NUMBER OF
18 : BEGIN
pRecRef.SETTABLE(lRecCustomer);
PAGE.RUN(21,lRecCustomer);
END;
23 : BEGIN
pRecRef.SETTABLE(lRecVendor);
PAGE.RUN(26,lRecVendor);
END;
27 : BEGIN
pRecRef.SETTABLE(lRecItem);
PAGE.RUN(30,lRecItem);
END;
END;
Now, there is one more thing you should do. Go to the listpage and go to the Page Actions. Add a new Action 'DoubleClickView'
Property: Visible = False. RunPageMode = View. Image = View. ShortCutKey = Return
Local: RecordRef (for exmaple lRecRef)
Code:
lRecRef.GETTABLE(Rec);
YourCodeunit.DoubleClickView(lRecRef);
Et voíla
Kind regards