Netsuite 正在检索当前登录的用户';s的标题/称呼失败

Netsuite 正在检索当前登录的用户';s的标题/称呼失败,netsuite,suitecommerce,Netsuite,Suitecommerce,在NetSuite SuiteCommerce Advanced中,我试图获取当前登录的用户标题(先生、女士等) 我使用的是commerceapi和函数Customer::getFieldValues()。我正在检索列/字段名。当我执行这个函数时,当它应该返回用户标题/称呼时,它返回一个空对象。注意:我已确认用户的标题/称呼设置为“Mr” 有什么建议说明SCA为什么不返回用户的标题吗?这太令人讨厌了 *模块\m超越\ProfileOverrides@1.0.0\SuiteScript\Profi

在NetSuite SuiteCommerce Advanced中,我试图获取当前登录的用户标题(先生、女士等)

我使用的是
commerceapi
和函数
Customer::getFieldValues()
。我正在检索列/字段名。当我执行这个函数时,当它应该返回用户标题/称呼时,它返回一个空对象。注意:我已确认用户的标题/称呼设置为“Mr”

有什么建议说明SCA为什么不返回用户的标题吗?这太令人讨厌了

*
模块\m超越\ProfileOverrides@1.0.0\SuiteScript\Profile.Model.js

define('Profile.Model',['SC.Model', 'underscore', 'Utils'], function (SCModel,  _,  Utils)
{
    'use strict';

    return SCModel.extend({
        name: 'Profile'

    ,   get: function ()
        {
            //You can get the profile information only if you are logged in.
            if (this.isLoggedIn && this.isSecure)
            {

                // Retrieve the currently logged in users saluation (eg Sir, Mr, Mrs, etc.)
                // Why on earth does NS not return this!!!
                var profile = customer.getFieldValues(['salutation']);
                console.log("PROFILE", profile); // outputs "PROFILE {}"

    ...
*编辑:我错误地说明了文件是
Modules\MyOverrides\AccountOverrides@1.0.0\SuiteScript\Account.Model.js
:当它实际上是
模块时\MyOverrides\ProfileOverrides@1.0.0\SuiteScript\Profile.Model.js

您能告诉我您在哪里申报客户和会话吗?@AdolfoGarza谢谢您的评论。仅供参考,当文件实际上是
Modules\…\Profile.Model.js
时,我错误地说明了文件是
Modules\…\Account.Model.js
。重新;如果我声明
客户
会话
,我不会。如果您熟悉SCA suitescript文件
Modules\suitecommerce\Profile@2.1.0\SuiteScript\Profile.Model.js
您将看到它的
get
函数也没有声明这些变量。所以我认为它们是全球性的。用户已登录并处于安全状态,因为代码将执行并可以检索用户的名字、姓氏等。只是
称呼
失败。