<turbo-stream action="update" target="wiki_card"><template>
<h1>LSLookup(Link Storage Code, Link Field value)</h1>
<div><br></div><div>With the LSLookup function, you can retrieve values from <a href="/wiki/link_storages" data-turbo="true" data-turbo-stream="true" data-controller="wiki" data-action="wiki#updateUrl">Link Storages</a>. You specify the Link Storage Code as the first parameter and the value to be used for the lookup as the second parameter.<br><br></div><div>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).<br><br></div><p>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") &nbsp;<br><br></p><div>&nbsp;<br><br></div><div><strong>Example 1:<br></strong><br></div><blockquote><strong>##LSLookup('CUST', "No.")<br></strong><br>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 Ids.<br><br></blockquote><div><strong>&nbsp;<br></strong><br></div><div><strong>Example 2:<br></strong><br></div><blockquote><strong>##LSLookup('ITEM',"ITEMNMBR")<br></strong><br>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 Ids.<br><br></blockquote><div>&nbsp;<br><br></div><div><strong>Example 3:<br></strong><br></div><blockquote><strong>##LSLookup('CUST'+'#REVERSE',"AccountId")<br></strong><br>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 Ids.<br><br></blockquote><div><strong>Example 4:<br></strong><br></div><blockquote><strong>##LSLookup('SALESORDER', "Document Type"+'#'+"Document No.")<br></strong><br>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 Ids.<br>This formula would typecally be used in the Field List on a Sales Line Transfer.<br><br>&nbsp;<br><br></blockquote>
</template></turbo-stream>

<turbo-stream action="replace" target="meta_description"><template><meta content='Retrieve value for a key from the specified Link Storage ' id='meta_description' name='description'></template></turbo-stream>
<turbo-stream action="replace" target="meta_keywords"><template><meta content='LSLOOKUP' id='meta_keywords' name='keywords'></template></turbo-stream>
<turbo-stream action="update" target="meta_title"><template>LSLookup - MyRapidi Wiki</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
