How to access key field for a Window in a calculated field
I have an Extender Window (Window type) with a calculated field that I want to display the date that the Service Order went into INPRG status.
The formula for the calculated field needs to be a SQL statement like this:
select max(a.DATE1) statdate
from SO10106 a JOIN
SO40010 b ON b.soStatusID = a.soStatusID
where soServiceOrderNumber = <SERVICE ORDER ID FROM WINDOW>
and b.soServiceOrderStatus = 'INPRG'
The problem is the key field (ServiceOrderNumber) for the window is not available to select from the Fields list.
How do you access the key field for the GP window that the extender window is attached to?
Thank you,
Karen
I have a very similar problem. I need the key field to use as an update value for a logic task in an extender window.
I can use the Window fields for parameters, but cannot get to the key field.
Any suggestions?
The Key Field is not available in the Calculated fields. You could do a calculation such as the following:
Case soServiceOrderStatus
when 'INPRG' then max(a.DATE1) statdate
else ' '
Otherwise, using the SQL Scripting in the logic should allow you to set the value on the Extender Window to a field with the Date type. The script would then populate it.
The Key Fields are available in the logic by using the parameter of CurrentID. In 2013 they will show up as Paramters in Extender Enterprise so that you don't have to use Current ID.
Thanks,
Nicole
I must be missing something. I dont see CurrentID as valid anywhere in the SQL logic.
CurrentID is not in the SQL Logic, it is in the Dynamics GP (Dexterity) Logic and is only a part of the Extender dictionary. You may not see it in the list of commands, but if you type in something like "warning CurrentID;", it should validate. The CurrentID will then get the ID from the resource.