Hi All,
I am having one problem here. Just wondering if there is any solutions.
Scenario:
I would like to create a view of the posted sales line. Meaning that the user is able to see the posted sales line record like we see the record when we run the table designer. In stead of viewing the record at the table level, we put this on a form.
Besides all the column from the posted sales line, i would like to put in the customer name as well.
At this moment, i use the coding to retrieve the customer name and store it in a variable. This variable is the source expression for the column. The problem is : this column does not behave like others column from the table. The find function doesn't work.
Anyone of you know how to make the find function work like the others standard field?
Your help is most appreciated.
Thank you.
Regards
Rachel
0
Comments
I dont know what do you mean by
But if I had to do such an assignment, I would write this code in OnAfterGetRecord trigger of the form
or if I had to use find function, I would write something like this
I hope this helps.
Regards
Jyotsna
Thanks for your prompt reply.
Torben R., is there any method will be serve the same function? i've tried out everyfield on the form, basically all the fields from the table can do the find except the new column with the variable.
Jyotsna, i think u miss understand m problem. Below is the step which might help u to understand better.
1) Create a new form for sales invoice line
2) add all the fields to the form
3) run the form
4) if u press M at the NO. column, then the FInd window will be prompted, and the cursur will get focus at the record which the No start with M.
however, if i add in new column, with source expression CustName (use code to retrieve customer name). Then the above Find window will not appear/get focus at the record with the CustName start with M.
You can add a new field to the table "posted sales line".
This should be a flow field that makes a lookup in the customer table.
Add this field to your form, then you can search in it.
So long
Martin
Thanks for your advise.
I was thinking not to add a new field for the customer name. Is this only method?
Regards
Rachel
Yeah I got ur problem. I think Torben is right.
We have such an example in Navision too. In employee list, we cannot search on full name. This is an added field. It has to be a field.
Regards
Jyotsna
Well you got only two options :
1. Add a field (custname) in the form and write the following code on
onaftergetrecord
if cust.get("sell-to customer no.") then
custname := cust.name
else
custname := '';
This will same a field in the table but will not give u an optiong to find
on this field
2. Add a flowfield in the table.
This field will not occupy any space as it is a virtual field and both your
purposes will be fulfilled.