Script: GL Lookup by Account #, not Key

SOLVED

I am writing a script, and need to lookup a GL AccountKey when I know the GL Account #.

Scenario

I am changing a the GL code on a line item on a Sales Order based on inputs from user (custom fields on the line item).   If they enter Item A,  UDF1: 20,  it goes to GL code say 100-30.   
The First segment is determined by Item, the second is determined by the UDF.  There are a set amount of custom field options.   I can generate the GL Account #, but I need the Key so I can populate the SalesAcctKey field.

Appreciate any suggestions.   Thanks