Skip to main content

Hi,

 

I am looking for a solution where I have a Boolean value on the user, the value will state if all the warehoused should be available for the user when selecting the warehouse for the current branch.

if the bool is true then we I want to only show the current rows branch's warehouses and not all the warehouses in the system. but if the bool is false I don't want the where clause to be part of the PXRestrictor. 

 

I cant control a PXRestrictor with a bool and this is the problem i don't always want to apply the where clause to the look up field. 

 

Current Code

  #region SiteID  
  bPXMergeAttributes(Method = MergeMethod.Append)]
 

  public int? SiteID { get; set; }
  #endregion

 

I have a bool on the same DAC usrWarehouseLock and if this is true then apply the current PXRestrictor and is false ignore and just continue with the normal functionality. 

 

Any help will be amazing thanks. 

 

Have you tried something like:

[PXRestrictor(typeof(Where<usrWarehouseLock.IsEqual<True>.
And<INSite.branchID.IsEqual<SOLine.branchID.FromCurrent>>>),
"", typeof(INSite.siteID))]

(this uses PX.Data.BQL.Fluent)


Reply