Skip to main content
4478138
Participant
January 19, 2018
解決済み

identity.lastNameが機能していない?(Acrobat DC)

  • January 19, 2018
  • 返信数 1.
  • 714 ビュー

現在Acrobat DCで名前入りのスタンプを作成しようとフォームにスクリプトを作成しているのですが、機能しないです。

下記がスクリプトです。 return後の部分を文字列にすれば通るので、identity.lastNameに何かしら問題が有るのではと思っています。

お詳しい方がいらっしゃいましたらご回答いただければ幸いです。

よろしくお願いします。

LN(ln;cd;fn).1

var m =

{

ln: function() { return identity.lastName; },

fn: function() { return identity.firstName; },

fi: function() { return identity.firstName.substring(0, 1); },

gr: function() { return identity.department; },

ti: function() { return identity.title; },

cp: function() { return identity.corpAbbrev; },

jd: function() { var dt = util.printd("j.mm.dd", new Date()); return dt.substring(1, dt.length); },

cd: function() { return util.printd("\'yy.mm.dd", new Date()); },

lf: function() { return (identity.firstName)? identity.lastName + "(" + identity.firstName.substring(0, 1) + ")" : identity.lastName; },

x: function() { return "国国国国"; }

};

var i = event.target.name.match(/\((.*)\)\.(v?)(.)/);

var p = i[1].split(/;/);

var mp = p[(1 * i[3]) - 1];

var v = m[mp]();

event.value = i[2] ? v.replace(/(?=.)(.)(?=.)/g, "$1\n") : v;

    このトピックへの返信は締め切られました。
    解決に役立った回答 IceFloe

    SDK Documentationに以下の記載があります

    ---ここから


    Note:The identity object properties are only accessible during batch, console and application initialization events to protect the privacy of the user. See Privileged versus non-privileged context for details.

    ---ここまで

    セキュリティ上の理由(ユーザーが意図せず氏名やメールアドレスを抜かれる懸念)から

    identity属性はフォームでは動作しません。

    バッチ処理やアドオン用のJSの場合はチャント動作します。

    返信数 1

    IceFloe
    IceFloe解決!
    Participating Frequently
    January 19, 2018

    SDK Documentationに以下の記載があります

    ---ここから


    Note:The identity object properties are only accessible during batch, console and application initialization events to protect the privacy of the user. See Privileged versus non-privileged context for details.

    ---ここまで

    セキュリティ上の理由(ユーザーが意図せず氏名やメールアドレスを抜かれる懸念)から

    identity属性はフォームでは動作しません。

    バッチ処理やアドオン用のJSの場合はチャント動作します。