web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics RMS (Archived)

Using ItemLookupcode as a condition for Receipt

(0) ShareShare
ReportReport
Posted on by

Hi

I'm trying to use a specific ItemLookupcode as a condition on a receipt.

For example:

<CONDITION> Entry.Item.ItemLookupcode = 0001 </CONDITION>

However I am having a hard time figuring out exactly how to this. I'd like it so that if the transaction includes an item with a specific itemlookupcode as specified in the condition then this condition is fulfilled.

Any help is much appreciated, thank you.

*This post is locked for comments

I have the same question (0)
  • raelhefn Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

                    <IF>

                         <CONDITION> Entry.Item.ItemLookupcode = "0001"  </CONDITION>

                         <THEN>

    /* You cab set value */

                      <SET name="XYZ" type="vbcurrency">  Entry.ExtendedExclsvPrice + Entry.ExtendedDiscount </SET>

    /* OR ADD ROW*/

                       <ROW> Entry.Item.ItemLookupCode  </ROW>

                   </THEN>

                </IF>

  • Community Member Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

    Hi Ramy

    Thanks for the help. However I've tried using:

    <CONDITION> Entry.Item.ItemLookupcode = "0001"  </CONDITION>

    and this doesn't appear to work? When I use this as a condition and add item 0001 to basket it doesn't fulfil the condition.

  • raelhefn Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

    Define this variable

      <SET name="XYZ" custom="true" description="XYZ" type="vbString">"0001"</SET>

    Your condition will be

                  <IF>

                     <CONDITION> Entry.Item.ItemLookupcode = XYZ </CONDITION>

                        <THEN>

    <!--     Your Condition    -->

                        </THEN>

                   </IF>  

  • Suggested answer
    Antonijo Todorovik Profile Picture
    4,025 on at
    RE: Using ItemLookupcode as a condition for Receipt

    Hi there.

    Mayby if You try something like

    <CONDITION> Entry.Item.ItemLookupcode  <>  "0001" </CONDITION>

         <THEN>

             ... something

          </THEN>

          <ELSE>

               ... your code

         </ELSE>

    </IF>

    The "<>" string is substitute for "<>" ...

    Kind regards, A.

  • raelhefn Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

    Please verify if this solution fit your requirements.

  • Suggested answer
    Antonijo Todorovik Profile Picture
    4,025 on at
    RE: Using ItemLookupcode as a condition for Receipt

    Sorry, my mistaque... You shoudl use "&_l_t_;" and "&_g_t_;" for "<" and ">", just delete the "_" characters in my strings and use them without quotes, as HTML automatically converts my string into < or > .... I've tested and it works fine...

    Kind regards, A. 

  • Community Member Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

    Hi Ramy

    I've set this up however it doesn't seem to work. The code I've put in is as follows:

    <SET Name="Test" custom="true" description="Test Code" type="vbString">"0001"</SET>

    <CONDITION>Entry.Item.ItemLookupcode = Test </CONDITION>

    However this condition seems to be fulfilled every time I add an item to the basket and not just when the item 0001 is added to the basket.

  • raelhefn Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

    you can reverse your condition by using <>

    <CONDITION>Entry.Item.ItemLookupcode <> Test </CONDITION>

    <!-- Do Action-->

  • Community Member Profile Picture
    on at
    RE: Using ItemLookupcode as a condition for Receipt

    Hi Ramy

    I really appreciate you helping out, thank you.

    However I've tried using that format:

    <CONDITION>Entry.Item.ItemLookupcode <> Test </CONDITION>

    and it returned the error: It may not be a well-formed XML document. So I used the:

    <CONDITION>Entry.Item.ItemLookupcode &_l_t_;_&_t_; Test </CONDITION> (without the _)

    Which worked however it is not working on any items now and none of them fulfill the condition.

    So the "=" condition works for all products (not just test) and "<>" doesn't work for any products.

    It seems like there is an issue with it picking up the lookupcode from the item?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics RMS (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans