Skip to main content
Solved

The condition inside a BQL select _____ must be parameterized?


Let me know if this is not the correct place to pose this question, but I’m currently following the T210 training materials and was given the task to create a master/detail relationship between 2 DACs.  I believe I’ve done this but keep getting met with the error in the topic title and not sure how to proceed forward.  My dac properties are defined exactly like they are in the GIT example and not sure where else to look to try and figure this out -

 

        #region ServiceID
        [PXDBInt(IsKey = true)]
        [PXDBDefault(typeof(RSSVRepairPrice.serviceID))]
        [PXParent(typeof(SelectFrom<RSSVRepairPrice>.
            Where<RSSVRepairPrice.deviceID.IsEqual<RSSVLabor.deviceID>.
                And<RSSVRepairPrice.serviceID.IsEqual<RSSVLabor.serviceID>>>))]

        public virtual int? ServiceID { get; set; }
        public abstract class serviceID : PX.Data.BQL.BqlInt.Field<serviceID> { }
        #endregion

 

Any help would be greatly appreciated

Best answer by Naveen Boga

Hi @kmauzoul97  Please find the sample Parent and Child DAC fields for your reference.

 

// Parent DAC Field

 #region ParentProcessID

        [PXDBInt]
        [PXUIField(DisplayName = "Process ID")]
        public virtual int? ParentProcessID { get; set; }
        public abstract class parentProcessID : IBqlField { }

        #endregion  




//Child DAC Field

#region ProcessID       

        [PXDBInt()]
        [PXUIField(DisplayName = "Process ID")]
        [PXDBDefault(typeof(SOOrderProcessLog.processID))]
        [PXParent(typeof(Select<SOOrderProcessLog, Where<SOOrderProcessLog.parentProcessID, Equal<Current<SOOrderLevelProcessLog.processID>>>>))]
        public virtual int? ProcessID { get; set; }
        public abstract class processID : IBqlField { }

        #endregion

 

For your example, it should be like below.

//I'm assuming that 

// RSSVRepairPrice --> Parent DAC
// RSSVLabor --> Child DAC


#region ServiceID
        [PXDBInt(IsKey = true)]
        [PXDBDefault(typeof(RSSVRepairPrice.serviceID))]

[PXParent(typeof(Select<RSSVRepairPrice, Where<RSSVRepairPrice.serviceID, Equal<Current<RSSVLabor.deviceID>>>>))] 
        public virtual int? ServiceID { get; set; }
        public abstract class serviceID : PX.Data.BQL.BqlInt.Field<serviceID> { }
        #endregion

 

Attaching article link for more details..

https://asiablog.acumatica.com/2019/04/grids-master-detail-relationship.html

View original
Did this topic help you find an answer to your question?

2 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • Answer
  • August 30, 2021

Hi @kmauzoul97  Please find the sample Parent and Child DAC fields for your reference.

 

// Parent DAC Field

 #region ParentProcessID

        [PXDBInt]
        [PXUIField(DisplayName = "Process ID")]
        public virtual int? ParentProcessID { get; set; }
        public abstract class parentProcessID : IBqlField { }

        #endregion  




//Child DAC Field

#region ProcessID       

        [PXDBInt()]
        [PXUIField(DisplayName = "Process ID")]
        [PXDBDefault(typeof(SOOrderProcessLog.processID))]
        [PXParent(typeof(Select<SOOrderProcessLog, Where<SOOrderProcessLog.parentProcessID, Equal<Current<SOOrderLevelProcessLog.processID>>>>))]
        public virtual int? ProcessID { get; set; }
        public abstract class processID : IBqlField { }

        #endregion

 

For your example, it should be like below.

//I'm assuming that 

// RSSVRepairPrice --> Parent DAC
// RSSVLabor --> Child DAC


#region ServiceID
        [PXDBInt(IsKey = true)]
        [PXDBDefault(typeof(RSSVRepairPrice.serviceID))]

[PXParent(typeof(Select<RSSVRepairPrice, Where<RSSVRepairPrice.serviceID, Equal<Current<RSSVLabor.deviceID>>>>))] 
        public virtual int? ServiceID { get; set; }
        public abstract class serviceID : PX.Data.BQL.BqlInt.Field<serviceID> { }
        #endregion

 

Attaching article link for more details..

https://asiablog.acumatica.com/2019/04/grids-master-detail-relationship.html


  • Author
  • Freshman I
  • 1 reply
  • August 31, 2021
Naveen B wrote:

Hi @kmauzoul97  Please find the sample Parent and Child DAC fields for your reference.

 

// Parent DAC Field

 #region ParentProcessID

        [PXDBInt]
        [PXUIField(DisplayName = "Process ID")]
        public virtual int? ParentProcessID { get; set; }
        public abstract class parentProcessID : IBqlField { }

        #endregion  




//Child DAC Field

#region ProcessID       

        [PXDBInt()]
        [PXUIField(DisplayName = "Process ID")]
        [PXDBDefault(typeof(SOOrderProcessLog.processID))]
        [PXParent(typeof(Select<SOOrderProcessLog, Where<SOOrderProcessLog.parentProcessID, Equal<Current<SOOrderLevelProcessLog.processID>>>>))]
        public virtual int? ProcessID { get; set; }
        public abstract class processID : IBqlField { }

        #endregion

 

For your example, it should be like below.

//I'm assuming that 

// RSSVRepairPrice --> Parent DAC
// RSSVLabor --> Child DAC


#region ServiceID
        [PXDBInt(IsKey = true)]
        [PXDBDefault(typeof(RSSVRepairPrice.serviceID))]

[PXParent(typeof(Select<RSSVRepairPrice, Where<RSSVRepairPrice.serviceID, Equal<Current<RSSVLabor.deviceID>>>>))] 
        public virtual int? ServiceID { get; set; }
        public abstract class serviceID : PX.Data.BQL.BqlInt.Field<serviceID> { }
        #endregion

 

Attaching article link for more details..

https://asiablog.acumatica.com/2019/04/grids-master-detail-relationship.html

 

Thank you - this worked.  Any particular reason why this syntax works over the syntax I was taught in the training materials ?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings