Select Multiple Products

Is there anyway to select multiple products[ Quoted Line Items] in custom module.

or in Multi select field can we get the related module quoted line items. so that user can choose what items to be wanted in another module.

Help me to solve this ..

Thanks in Advance..

hats Alex Nassi

  • We had implemented something like that before.

    Find the steps:

    • create a text area field, inside which you can save a lots of records' IDs (note that SugarCRM's ID is a hash md5 containing 36 characters).
    • create an endpoint which will fetch QLIs from db, eventually based on a parameter to be sent to endpoint.
    • create a field template which will fetch data from such endpoint.
    • Update the record view making such text area field to be rendered as its custom field template.

    We had created some field templates which are very useful for scenarios like that:

    • enum-api (which renders a dropdown based on an endpoint without additional parameter)
    • enum-parent-api (which renders a dropdown based on an endpoint with one parameter from current view)
    • enum-mult-parent-api (which renders a dropdown based on an endpoint with two or more parameters from current view)

    This is it!

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thanks For Reply Andre ,

    Can you post any reference code to create an Endpoint with custom logic.

  • Do you mean other than creating a one to many relationship between your custom module and the quoted line items?  This would result in a quoted line item subpanel on the custom module record view.

    If you want to do this in a dynamic multi-select field, then yes you'll need code.

  • Yes Adrian Boerstra.

    I want to select which Products to Be added In subpanel..When create a new record

  • Hi Ash,

    As Adrian Boerstra mentioned, you can create a custom multi-enum field and write a utility function to generate drop down options dynamically based on your Quoted line items module. This way, you will see a multi-select dropdown showing all your QLIs and user can select multiple QLIs at a time.

    Let us know if this is what you are trying to achieve.