2016-07-07 20 views
0

SOOrder画面に新しいフィールドを作成しましたが、現在のユーザーログインのデフォルト値userRoleをそのテキストボックスに入れたいのに、上記のエラーが発生しました。これは私のコーディングです:が見つかりませんでした(使用するディレクティブまたはアセンブリ参照がありません)

//Layout Editor: SO301000 (Sales Orders) 
[PXDBString(64)] 
[PXDefault(typeof(Coalesce<Search<UsersInRoles.userName, Where<UsersInRoles.userName, Equal<Current<AccessInfo.userName>>>>, 
     Search<BAccount.ownerID, Where<BAccount.bAccountID, Equal<Current<SOOrder.customerID>>>>>), 
     PersistingCheck = PXPersistingCheck.Nothing)] 
[PXUIField(DisplayName="Current User" , Enabled = false)] 

error: Cannot implicitly convert type 'PX.Data.PXResultset' to 'PX.SM.UsersInRoles' in file: Code#SOOrderEntry(80) 
error: 'PX.Data.PXRowSelectingEventArgs' does not contain a definition for 'NewValue' and no extension method 'NewValue' accepting a first argument of type 'PX.Data.PXRowSelectingEventArgs' could be found (are you missing a using directive or an assembly reference?) in file: Code#SOOrderEntry(83) 

助けてください!

答えて

0

UsersおよびUsersInRoles DACはPX.SM名前空間にあります。 using PX.SM;を使用するか、毎回これらのクラスに名前空間を指定するか、PX.SM.UsersInRoles.username

P.S.のように指定する必要があります。 **;>UsersInRoles.username

Users.userName - - - >Users.username

Users.PKID私はすでに追加しました>Users.pKID

+0

**使用PX.SM

UsersInRoles.userName:一部の文字があなたの例では正しくない場合がありますビジネスロジックのカスタマイズでは、同じエラーが発生しました。 – YSP

+0

質問に完全なファイルコンテンツを追加できますか?それは参考になるでしょう。第2の方法で試すこともできます。それは動作しますか? –

+0

画面上では、現在のユーザーのログインのuserRoleを格納する新しいフィールドを追加したいのですが、SOOrderはownerIDしか持っていないので、ユーザー名を取得するためにUsersInRoleのようなユーザーに参加する必要があります。私は上記の私の質問を編集するので、それを親切にチェックしてください。 – YSP

関連する問題