Hi,
Can any body give me idea on this. I have form based on the tables similar to sales header and sales line which contains data in it. But the requirement is that , when we open form, we should not able to see any records in it. User will be given one text box in which users enters the primary key of that table then data from both in header and line should be fetched. can any body give me idea how to achieve this
0
Comments
KCP Consultores
GenJnlLine.FILTERGROUP := 2;
GenJnlLine.SETRANGE("Journal Batch Name",CurrentJnlBatchName);
GenJnlLine.FILTERGROUP := 0;
can any body suggest how to block showing of all records when form is opened or until that primary key is specified
It searchs the sales orders and if it finds a match it bings up that order.
If it doesn't find a match it then searches the posted invoices.
If it finds a match it then brings up that invoice.
else it says order not found.
We call it our quick search form.
Sounds like you are looking for something like that. or you can study the code to see how it works and then implement your own.
InvCount->Integer
SalesInvoiceHeader->Record->Sales Invoice Header
SalesHeader->Record->SalesHeader
ScanOrderNo->Code20
SalesForm->Form->Sales Order
InvoiceForm->Form->Posted Sales Invoice
SourceExp of textbox = ScanOrderNo
http://www.BiloBeauty.com
http://www.autismspeaks.org
now that's just an example - I don't know the exact requirement you are trying solve.
I happen to put the textbox on a seperate form but you can try it anywhere you like.
All the code is OnAfterValidate of the textbox so it's all inclosed in one thing.
We use it to search posted & non posted orders - you might not need this - so you can use snipits if you like - it was just an example.
http://www.BiloBeauty.com
http://www.autismspeaks.org