2 Replies Latest reply on Apr 1, 2016 2:54 AM by bigtom

    Auto Adding related products  in a portal

    hunterkilla

      Hi

       

      I have a system that I use for bookings for clients,  its setup where we add products to an order and they can choose qty and other details and it adds the totals up.   What I would like to do is when we add product A it then auto adds product B which is the ingredients that goes with product A, currently we have to add both A and B manually

       

      Is this possible?

        • 1. Re: Auto Adding related products  in a portal
          bigtom

          Yes this is possible via script and can be fairly fast with Perform Script on Server and Refresh Portal if you are running FMS 14. It will work with other versions but a little slower.

           

          How are the ingredients B related to product A? I think you really need to start with that question first.

           

          The script will need a key for product A. Depending on the relationship there are various ways to get the keys for ingredients B. You would then loop though adding those to the portal or going to a table for direct entry, in which case you need the main parent record key as well.

           

          Refresh the portal or window and its done.

          • 2. Re: Auto Adding related products  in a portal
            bigtom

            You might want some sort of number system to sort the potral by so the ingredients always appear just below the product they relate to.