This topic contains 7 replies, has 0 voices, and was last updated by vkwanengage 6 years ago.

  • Author
    Posts
  • #22513 Score: 0

    vkwanengage
    • Contributions: 0
    • Level 1

    Hello, Sorry i'm relatively new to NetSuite…..

    So here is my problem:

    I have a Custom Record Type with a field called "Default Vendor". I've hooked this up so that: Type -> List/Record, List/Record -> Vendor

    Now, what i'm trying to achieve is the following:

    In my Inventory Items, I have a sublist where I can select which Vendor i wanted associated to this Inventory Item… So say i have 5 Vendors in my system, and I attach the first two vendors (VENDOR 1 and VENDOR 2). Is there a way I can only show those two Vendors in my "Default Vendor" field in my custom record type instead of showing all 5 vendors?

    Hopefully this is enough info…. Thanks and have a great day everyone.
    This is a cached copy. Click here to see the original post.

  • #22514 Score: 0

    k_dunc
    • Contributions: 0
    • Level 1

    Hi vkwanengage,

    I'm not sure if this is exactly what you're after, but try something like this:Create a new custom Item Field.
    Set the Type to "Multiple Select".
    Set the List/Record to "Vendor".
    From there, you should then be able to select one or more Vendors linked to the Item record. I hope this helps.

  • #22515 Score: 0

    vkwanengage
    • Contributions: 0
    • Level 1

    Hey @k_dunc,

    Thanks for the reply. I actually want to to achieve this. Say my dropdown has a list of vendors like below:

    Vendor 1

    Vendor 2

    Vendor 3

    Vendor 4

    Vendor 5

    Now what i want to do is I only want to show Vendor 1 and Vendor 2 in the list so my end result should be:

    Vendor 1

    Vendor 2

    I've been reading the documentation and it says that you cannot use the removeSelectOptions unless the prefix is custpage_? So yeah i dunno if this can be achieved on a Type -> List/Record.

    Thanks.

  • #22516 Score: 0

    k_dunc
    • Contributions: 0
    • Level 1

    Hi vkwanengage,

    How are you hoping to populate the field – via a script? Or is it that you'd like to actually limit the number of Vendors first shown – e.g., you have say 100 Vendors, but depending on certain rules, you only want to show a list of say 5 from which the user can then select?

    Anyway, the steps that I have provided will indeed give you the end result that you seek. Because the Type is set to Multiple Select, the field allows the user to select multiple values – in this case, Vendors. If you follow the steps above, and test the form, you'll initially see the dropdown containing all 5 of your Vendors. Click on Vendor 1 from the list, then hold down your Ctrl key, and click on Vendor 2. This means you have now selected both Vendor 1 and 2 for this record.

    Cheers.

  • #22517 Score: 0

    vkwanengage
    • Contributions: 0
    • Level 1

    Hey k_dunc ,

    So here is my situation.

    1. I have an Inventory Item. In this inventory Item, i have a subtab called: Purchasing/Inventory. In this subtab, i have a sublist called Vendors…

    2. Within Vendors, I can select x amount of Vendors to attach to this Inventory Item.

    3. Now, the issue here is that I have a sublist of programs where I have a field that will list all the vendors that were added in step 2. This is what I want to achieve. So instead of showing all available Vendors in our system, i want to limit the amount of vendors that I added in step 2? Is this achievable?

    My main strategy was to retrieve all the vendors in step 2 and then i was going to remove all the items in the vendor dropdown and then re-add them, but i figured this is not an easy task, esp since NetSuite provides a nice search and list view if you have too many items in there… I also wanted to use removeSelectOptions, but that didn't work

    Also, My main goal was not to have multi-select on the dropdown

  • #22518 Score: 0

    pcutler
    • Contributions: 0
    • Level 1

    Depends on exactly how your data is structured, but this is likely doable using the sourcing & filtering tab of the vendor custom field.

    If your data model doesn't support that, it's also possible to dynamically create a drop-down with the desired vendor options via script.

  • #22519 Score: 0

    k_dunc
    • Contributions: 0
    • Level 1

    Hi vkwanengage,

    Right, so a Sublist with an Item record is a bit different from a Select / Multi Select Field. In that case, then there's probably only 2 ways to show a Sublist showing only 'some' Vendors. The first, would be to create a Saved Search (if this is possible) based on what Vendors you want to show. Because you're saying that you're showing a Sublist, not a Field, regrettably you cannot use Sourcing and Filtering as described above. You'd likely need a Saved Search then in the Vendor record, whilst looking at the Sublist, choose the Saved Search from the "View" drop-down box.

    My gut feeling is that this is not practical. How would you write a Saved Search that shows a short list of Vendors only per Item record, unless of course the Saved Search is based on 'show all Vendors from whom we have purchased this Item'? But even then, that won't work because the Saved Search is not a 'dynamic search based on the record you're looking at'.

    The second approach (and perhaps the only one that will work) would be to create your own Sublist via a script and populate the results directly from the script.

    Hope that helps. Cheers,

    Kirk.

  • #22520 Score: 0

    vkwanengage
    • Contributions: 0
    • Level 1

    Hey pcutler and k_dunc ,

    Thanks for the feedback… Yeah i tried using the source and filtering, but that wasn't going to work….. Thanks for the suggestion.

    A saved search is an interesting approach, but as you said probably not practical since you would have to create saved searches for each item….

    I was really hoping i could just remove items from the dropdown and only show the ones I wanted… but the removeSelectOptions just can't do that I may just have to create a dropdown that doesn't attach the type as a vendor and just make it free form (so i just added whatever i want)…

    Anyways, thanks for your help everyone.

You must be logged in to reply to this topic.