美文网首页NETSUITE开发者实战培训
【干货/技巧/专题问答】如何为销售订单/采购订单明细添加行号?

【干货/技巧/专题问答】如何为销售订单/采购订单明细添加行号?

作者: e85a69573d55 | 来源:发表于2020-01-09 23:28 被阅读0次

问题

用户需要在销售订单和采购订单等交易记录的明细行上加入行号。

解答

交易行(transaction line)上有三个可以使用的字段。

Line IDs

The Line ID is not related to the line item's position in the sublist. Each line item is given a Line ID when it is created, which does not change until the line is removed regardless of the performed operations (e.g. editing the line, inserting a line item above). If the line item is removed and another line item is inserted to replace it, the new line item will have a different Line ID, but the same Line Sequence Number

Line ID可以理解为明细号,这个号不会变直到该行被删除时。删除以后有新的行记录进来会有完全不一样的Line ID号。

Line Sequence Numbers

The Line Sequence Number holds the internal sequence number stored for each transaction line according to the line item's position in the sublist and is the value expected by the nlobjSublist methods setLineItemValue(name, linenum, value) and getLineItemValue(group, fldnam, linenum).

Line Sequence Number是用来标记记录行内部的序列号。但是要注意这里的序列号是交易所有的行记录一起排的序列,比如其他的tax line、shipping line。

Line Number

这个我没有找到具体的文档,查询里边也没有,但是真的有这个字段,能用,也是解决这个需求的核心关键。

解决方案

1、做一个自定义交易行字段(transaction column filed),不保存值,类型为整数;

2、apply给需要的具体交易类型,类型为Inline

3、默认值勾选公式,值为{linenumber}

4、调整Form,把这个字段放到item子列表的最上边(这里一定要修改form,因为自定义交易行字段里边定义的位置最多排在自定义的最左边,没法放到所有字段的最左边。

原文

Applies To: NetSuite 2018.2

Product:SuiteBuilder

Scenario:

The user wants to add another column on the item sublist of a Sales Order containing the line number.

Solution:

User can create a custom transaction line field that appears in Sales Order This gives the user additional column in the Item Sublist to indicate the line number of each line items.

To add a custom transaction line field in sales order:

1. Go to Customization > Lists, Records, & Fields > Transaction Line Fields > New (Administrator).

2. In the Label field, enter a name or description for this field(e.g Line Number). The name appears as a column heading on the Item Sublist of the Sales Order Record.

3. Select the Type of the transaction line field. (e.g Integer Number)

4. Clear the Store Value box to indicate that the information stored in this custom field is for display only. The information is not stored in your account.

5. On the Applies To subtab, check the Sale Item box.

6. Check the Formula. Enter a Default Value for this field (e.g {linenumber}).

7. Click Save.

Your custom transaction line field automatically appears on the Sales Order Record. 

To include your custom transaction line field on a custom sales order:

1. Go to Customization > Forms > Transaction Forms (Administrator).

2.  In the Edit column, choose one of two options:

Click Customize next to the appropriate form name to create a new custom form specific to that standard form.

Customize Option is only available for the native standard forms of Netsuite.

Click Edit next to the appropriate form name to include your custom transaction line field on an existing custom form.

3. When the Custom Form page appears, enter a name for your form so it is recognizable when selecting it on the Sales Order page.

4. Click the Sublist Fields subtab.

5. Locate the name of your custom transaction line field.

6. Drag custom transaction line field to change the position on where it will show in the item sublists.

Make sure the Show checkbox is checked

7. Click Save.

The information you enter in your custom transaction line field on the Sales Order page now appears on the corresponding Item Sublist.

相关文章

网友评论

    本文标题:【干货/技巧/专题问答】如何为销售订单/采购订单明细添加行号?

    本文链接:https://www.haomeiwen.com/subject/vcwuactx.html