This topic contains 5 replies, has 0 voices, and was last updated by tzvig 7 years, 4 months ago.

  • Author
    Posts
  • #5554 Score: 0

    cbdyas
    • Contributions: 0
    • Level 1

    I’m relatively new to NetSuite. We’ve only been live for about three weeks now. I added an inline editor sublist to a record which was pretty straightforward. Users are able to view the list and add/remove/edit line items in the UI but there is one crucial issue. When a user submits that record containing the sublist the line items entered are not saved; i.e., when a previously saved record is viewed or edited the custom sublist is empty.

    I’m building the sublist in the beforeLoad method of a user event script. This is the only code I’ve written related to this feature so I’m sure I’m missing something.

    Code:
    function userEventBeforeLoad(type, form, request) {
    var artSubTab = form.addTab(‘custpage_artrequeststab’, ‘Art Requests’)
    var artSubList = form.addSubList(‘custpage_artrequestslist’, ‘inlineeditor’, ‘Art Requests’, artSubTab);
    artSubList.addField(‘logoname’, ‘text’, ‘Logo Name’);
    artSubList.addField(‘imprintmethod’, ‘text’, ‘Imprint Method’);
    artSubList.addField(‘imprintlocation’, ‘text’, ‘Imprint Location’);
    }
    This is a cached copy. Click here to see the original post.

  • #5555 Score: 0

    erictgrubaugh
    • Contributions: 0
    • Level 1

    The sublist items aren’t being saved because you have not defined a place for NetSuite to store them. You are creating a temporary sublist, users are modifying the sublist, but then you haven’t defined what happens once the record is saved.

    What you can do instead of your custom sublist/script:Create a custom record “Art Request” that can store the data for each line in the sublistI would expect this record should have Logo Name, Imprint Method, and Imprint Location fields

    Additionally, this record will need a List/Record field that links it to whatever record type is currently displaying your custom sublistThis field must be set to “Record is Parent”

    This should eliminate the need for your custom sublist and code altogether. The “Record is Parent” setting creates a parent-child relationship between your custom record and the parent record type. NetSuite automatically creates and shows appropriate sublists for child records within the parent (for example, Contacts on Customer records). You can then use form customization to decide where the sublist displays; by default, it will just be on a “Custom” subtab.

  • #5556 Score: 0

    cbdyas
    • Contributions: 0
    • Level 1

    Eric,

    Thanks, for your reply! I started off with that approach but switched gears because I wanted to take advantage of the inline editing capabilities due to the fact there are only 3 fields.

    On the custom record page I checked the box “Allow inline editing” but it doesn’t seem to do anything. I still have to click the new art request button, wait for a new page/form to load, save that form and return. It would be quicker from a usability standpoint to be able to quickly edit the three fields inline on the parent record. What am I missing here?


    erictgrubaugh replied on 02/03/2017, 03:02 PM: What is the parent record type?

  • #5557 Score: 0

    cbdyas
    • Contributions: 0
    • Level 1

    Transaction > Sales Order

  • #5558 Score: 0

    erictgrubaugh
    • Contributions: 0
    • Level 1

    You could now try rebuilding your Custom Sublist using a Saved Search of your Art Request records, though I don’t know that that gets you any nearer your inline editing goal. The Help page titled “Applying Custom Sublists to Standard Records” has the details on setting that up.

    If that fails, then you can modify your existing scripted approach by adding a handler on beforeSubmit that reads the values the user entered in the sublist and creates the Art Request records accordingly. You will also need to manage any edits/removals to the sublist as well.

  • #5559 Score: 0

    tzvig
    • Contributions: 0
    • Level 1

    cbdyas Try setting the following fields on the Child Record. It should make the sublist editable without using SuiteScript.

You must be logged in to reply to this topic.