簡體   English   中英

在SOOrder屏幕上設置具有角色的用戶的當前用戶登錄名的默認倉庫選擇器值

[英]Set default warehouse selector value of current user login with user in role on SOOrder screen

這是我對SiteID(自定義現有字段)的編碼

 [PXDefault(typeof(Search<PX.SM.RelationGroup.groupName,InnerJoin<PX.SM.Users, On<PX.SM.RelationGroup.groupMask,Equal<PX.SM.Users.groupMask>>,InnerJoin<INSite, On<PX.SM.RelationGroup.groupName,Equal<INSite.siteCD>>>>,Where<PX.SM.Users.pKID, Equal<Current<AccessInfo.userID>>>>),PersistingCheck = PXPersistingCheck.Nothing)]

發布項目時出現錯誤:

 error CS0311: The type 'PX.Data.Where<PX.SM.Users.pKID,PX.Data.Equal<PX.Data.Current<PX.Data.AccessInfo.userID>>>' cannot be used as type parameter 'OrderBy' in the generic type or method 'PX.Data.Search<Field,Where,OrderBy>'. There is no implicit reference conversion from 'PX.Data.Where<PX.SM.Users.pKID,PX.Data.Equal<PX.Data.Current<PX.Data.AccessInfo.userID>>>' to 'PX.Data.IBqlOrderBy'.
 error CS0311: The type 'PX.Data.InnerJoin<PX.SM.Users,PX.Data.On<PX.SM.RelationGroup.groupMask,PX.Data.Equal<PX.SM.Users.groupMask>>,PX.Data.InnerJoin<PX.Objects.IN.INSite,PX.Data.On<PX.SM.RelationGroup.groupName,PX.Data.Equal<PX.Objects.IN.INSite.siteCD>>>>' cannot be used as type parameter 'Where' in the generic type or method 'PX.Data.Search<Field,Where,OrderBy>'. There is no implicit reference conversion from 'PX.Data.InnerJoin<PX.SM.Users,PX.Data.On<PX.SM.RelationGroup.groupMask,PX.Data.Equal<PX.SM.Users.groupMask>>,PX.Data.InnerJoin<PX.Objects.IN.INSite,PX.Data.On<PX.SM.RelationGroup.groupName,PX.Data.Equal<PX.Objects.IN.INSite.siteCD>>>>' to 'PX.Data.IBqlWhere'.

在此處輸入圖片說明

看來您錯誤地修改了PXDefault屬性。

如果要使用BQL設置默認值,則必須使用“ 搜索”而不是PXSelect

請參閱下面的示例

[PXDefault(typeof(Search<SOOrderType.iNDocType, Where<SOOrderType.orderType, Equal<Current<SOLineSplit.orderType>>>>), PersistingCheck = PXPersistingCheck.Nothing)]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM