MyRapidi
MyRapidi

Search our Wiki

LSLOOKUP

 LSLookup(<Link Storage Code>, <Link Field value>)

 

With the LSLookup function, you can retrieve values from Link Storages. You specify the Link Storage Code as the first parameter and the value to be used for the lookup as the second parameter.

If the Link Storage has a key that is combined with more than one field, you need to make a formula that composes the total string to be used as the lookup value (see examples below).

You can use the LSLookup function to retrieve values in a reverse way - i.e. you supply the value for the 2nd column and get the value in the 1st column back from the function. To achieve this, you add "#REVERSE" to the Link Storage Code. For example LSLookup('CUST#REVERSE', "AccountId")  

 

Example 1:

##LSLookup('CUST', "No.")

This will retrieve the Account Id corresponding to the Customer No. in NAV (provided that the Link Storage CUST contains NAV Customer No's and corresponding SFDC Account Id's.

 

Example 2:

##LSLookup('ITEM', "ITEMNMBR")

This will retrieve the Product Id corresponding to the Item Number in GP (provided that the Link Storage ITEM contains GP Item No's and corresponding SFDC Product Id's.

 

Example 3:

##LSLookup('CUST#REVERSE', "AccountId")

This will retrieve the NAV Customer No. corresponding to the SFDC Account Id (provided that the Link Storage Cust contains NAV Customer No's and corresponding SFDC Account Id's.

Example 4:

##LSLookup('SALESORDER', "Document Type"+'#'+"Document No.")

This will retrieve the SalesHeader Id corresponding to the SalesOrder Document Type and Document No. in NAV (provided that the Link Storage SALESORDER contains NAV SalesOrder Document Type + Document No's and the corresponding SFDC SalesHeader Id's.
This formula would typecally be used in the Field List on a Sales Line Transfer.