小编CC4*_*325的帖子

尝试使用 suitescript 访问 Netsuite 中的子列表

我正在尝试使用工作流程脚本访问 NetSuite 中的子列表。我在所有销售订单上放置了一个按钮,一旦按下将执行此脚本。我不断收到一个错误,提示我的子列表为空。如果为空,有人可以解释为什么吗?

  function(record) {
    var salesorder = record.newRecord;
    var salesordernumber = salesorder.getValue('tranid');
    var date = salesorder.getValue('trandate');
    var sublist = salesorder.getSublistValue({
        Sublistid : 'item'
    });
      log.debug('Employee Code', salesordernumber);
  log.debug('Supervisior Name', date);
  log.debug('itemr', sublist);
    /**
     * Definition of the Suitelet script trigger point.
     *
     * @param {Object} scriptContext
     * @param {Record} scriptContext.newRecord - New record
     * @param {Record} scriptContext.oldRecord - Old record
     * @Since 2016.1
     */
});
    function onAction(context) {


    return {
        onAction : onAction
    };

    }
Run Code Online (Sandbox Code Playgroud)

javascript suitescript suitescript2.0

4
推荐指数
1
解决办法
1万
查看次数

无法通过构造函数将组件注入到组件中?

我试图调用 private login: LoginComponent,但是,当我添加 private login: 时,我的网站不会加载LoginComponent。在将登录添加到构造函数之前,我的网站加载并运行良好。我究竟做错了什么?我可以不调用私人登录:LoginComponent吗?我在下面附加了课程LoginComponent

import { Component, OnInit, ViewChild } from '@angular/core'
import { Router } from '@angular/router'
import * as Rx from "rxjs"
import { environment } from "../../../environments/environment"
import {LoginComponent} from "app/components/login/login.component"
import { AuthService } from "../../services/auth/auth.service"
import { LoginService } from "../../services/login/login.service"
import { SageApiService } from "../../services/sage-api/sage-api.service"
import { DataModel } from "../../model/data-model"
// wvj contract

@Component({
    selector: 'app-contract-form',
    templateUrl: './contract-form.component.html',
    styleUrls: ['./contract-form.component.css']
})
export …
Run Code Online (Sandbox Code Playgroud)

constructor typescript angular

0
推荐指数
1
解决办法
7297
查看次数