The following is from the Lookup.doc in the Software Development Kit (SDK). The SDK can be installed from the Tools folder of CD 2 of the install CDs.
IV_User_Categories_Lookup
Script call:
open form IV_User_Categories_Lookup return to USER_CATEGORY_FIELD;
set '(L) Number Check' of window IV_User_Categories_Lookp
of form IV_User_Categories_Lookup to ARRAY_INDEX;
set 'User Category Descriptions'[1]
of window IV_User_Categories_Lookup
of form IV_User_Categories_Lookup
to USER_CATEGORY_DESCRIP_FIELD;
set 'User Category Value' of window IV_User_Categories_Lookup
of form IV_User_Categories_Lookup to USER_CATEGORY_VALUE_FIELD;
run script 'Redisplay Button' of window IV_User_Categories_Lookup
of form IV_User_Categories_Lookup;
Description:
USER_CATEGORY_FIELD is the field on your form that should accept the return value.
In lines two through four of the script, ARRAY_INDEX is the index of the 'User Category Values' field that you want to lookup for.
In the third line of the script, USER_CATEGORY_DESCRIP_FIELD is the value you wish to set for the ‘User Category Description’ field.The "fill from current" statement is then used to fill the scrolling window and focus to the line that matches that key value.
In the fourth line of the script, USER_CATEGORY_VALUE_FIELD is the value you wish to set for the ‘User Category Value’ field.The "fill from current" statement is then used to fill the scrolling window and focus to the line that matches that key value.
David Musgrave [MSFT]
Escalation Engineer - Microsoft Dynamics GP
Microsoft Dynamics Support - Asia Pacific
Microsoft Dynamics (formerly Microsoft Business Solutions)
http://www.microsoft.com/Dynamics
mailto:David.Musgrave@online.microsoft.com
http://blogs.msdn.com/DevelopingForDynamicsGP
Any views contained within are my personal views and not necessarily Microsoft policy.
This posting is provided "AS IS" with no warranties, and confers no rights.