g_fnSetValue(var p_code); // At Item List g_codItemCode := p_code; // Sales Line (Record) l_recItem.RESET; g_frmItemList.SETRECORD(l_recItem); g_frmItemList.LOOKUPMODE(TRUE); IF g_frmItemList.RUNMODAL = ACTION::LookupOK THEN g_frmItemList.GETRECORD(l_recItem); VALIDATE("No.",l_recItem."No."); g_frmItemList.g_fnSetValue(g_ItemCode); MESSAGE('%1',g_ItemCode);
Comments
2) Which record is empty?
3) All depends on context. because sometime you need to call modify, sometime it will be saved automatically etc.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
1. Is the function g_fnSetValue() a function in form 31 Item List:?:
2. You call this function with , but where you set the g_ItemCode :?: So, your message will ever be empty.
3. What is the reason why you do this. What do you want to do ?
Sorry for my reply is too late.
Best Regards,
Yukon
Yes, it is, because the form is using "new" instance of Rec when creating line, it means all variables on the table are cleared...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thx... We don't choice for that ](*,)
Regards,
Yukon
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I set "Yes" at PopulateAllFields in item list (Form 31). And I go back to Sales Order.
1st I Filter(F7) By Item Category Code = 'PUMP', selected one item no (1000). And then i go to next line Press Item No button. But item list show all. I want to get/see previous data with Filter Item Category Code = 'PUMP' only.
Is it possible with code?
Regards,
Yukon
There is no standard way how to do that. The Lookup form will not save your filters between two lookups. You will need somehow change the OnLookup trigger to save the value,but you need to save it not only in global variable of the Rec, but e.g. in singleinstance codeunit (or you need to change the OnLookup on the form and save the filters in form global variable, but this will work only for the specified form...).
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
That right ...! I accept your suggestion and i also did it. But we can declare at form level. If i write form level, i need to write onlook trigger of all forms. So but i don't have choice for that .... ](*,)
Regards,
Yukon