ディスカッション
NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
NetSuite の始め方| N/record: Column.isMandatoryプロパティ
前の記事 NetSuiteの始め方 | SuiteScript 2.x Modulesで、レコードの操作に使用されるSuiteScriptモジュールおよびN/recordモジュールNetSuiteの始め方| N/record Module 概要を学習しました。次に、N/record: Column.isMandatoryプロパティのメンバーの1つを詳しく確認します。
Column.isMandatoryプロパティは、Columnオブジェクトのブール型プロパティです。これは、特に列メタデータの取得または構成時に、レコード・サブリストを操作するときによく使用されます。
このプロパティは、サブリスト列が必須かどうかを示します。つまり、ユーザーは、レコードまたはサブリスト行を保存する前に、そのフィールドに値を入力する必要があります。
このプロパティを設定すると、次のようになります。
- true– フィールドは必須になり、ユーザーは値を指定する必要があります。
- false– フィールドはオプションのままです。
このプロパティは、開発者がサブリストに必須フィールドを適用するSuiteletsフォームまたはカスタムUIフォームを作成する場合に特に便利です。
使用例
次の例では、Column.isMandatoryプロパティを使用して、その列の1つを必須として構成する方法を示します。
/**
* @NApiVersion 2.x
* @NScriptType Suitelet
*/
define(['N/ui/serverWidget', 'N/log'], function(serverWidget, log) {
function onRequest(context) {
// フォームにサブリスト作成
var form = serverWidget.createForm({ title: 'Mandatory Column Example' });
// フォームにサブリストを追加
var sublist = form.addSublist({
id: 'custpage_list', // Sublist internal ID
label: 'Sample Sublist', // Sublist label as shown to the user
type: serverWidget.SublistType.INLINEEDITOR // Allows inline editing
});
// サブリストに列(フィールド)を追加する
var col = sublist.addField({
id: 'custpage_col', // Column internal ID
label: 'Required Column', // Column label as shown to the user
type: serverWidget.FieldType.TEXT // Column type is text Richard James Uri - SuiteCloud | WMS Tech | SuiteCommerce Advanced
----
- NetSuite Admin Corner | New to NetSuite
- Explore the NSC Webinars Category
- Join our poll and share your ideas! We want to know what you think. Don't forget to comment and make your voice heard!
タグ付けされた:
0
