protected virtual void _(Events.FieldVerifying <KCProjectionBranchWithSite, KCProjectionBranchWithSite.integrated> e)
        {
            KCProjectionBranchWithSite row = (KCProjectionBranchWithSite)e.Row;

            if (row == null)
            {
                return;
            }

            if (row != null && e.NewValue != null)
            {
                if (Convert.ToBoolean(e.NewValue) == true && row.SiteMasterId == null)
                {
                    string msg = KCMessages.ChannelAdvisorSiteRequired;
                    ProjectionBranchWithSite.Cache.RaiseExceptionHandling <KCProjectionBranchWithSite.siteMasterId>(e.Row, row.SiteMasterId, new PXSetPropertyException <KCProjectionBranchWithSite.siteMasterId>(msg));
                    throw new PXException(msg);
                }
            }
        }
        protected virtual void _(Events.FieldSelecting <KCProjectionBranchWithSite, KCProjectionBranchWithSite.siteMasterId> e)
        {
            KCProjectionBranchWithSite row = (KCProjectionBranchWithSite)e.Row;

            if (row == null)
            {
                return;
            }

            if (row != null)
            {
                List <string> allowedText   = new List <string>();
                List <string> allowedValues = new List <string>();
                foreach (KCSiteMaster iSiteMaster in PXSelect <KCSiteMaster> .Select(this))
                {
                    allowedValues.Add(iSiteMaster.SiteMasterCD);
                    allowedText.Add(string.Format(KCConstants.DualParameters, iSiteMaster.SiteMasterCD, iSiteMaster.Descr));
                }

                e.ReturnState = PXStringState.CreateInstance(e.ReturnState, 10, true, typeof(KCSiteMaster.siteMasterCD).Name, false, -1, string.Empty, allowedValues.ToArray(), allowedText.ToArray(), false, null);
            }
        }