Skip to main content

Hi guys 

Here I need default values in unbound fields and 

I have tried  below scenarios both are not getting output could plz have look

 pPXUnboundDefault(typeof(Search<CSAttributeDetail.description,
        Where<CSAttributeDetail.valueID,
            Equal<Current<LocationExt.usrSuperMarket>>>>))]

AND

 

 protected void Location_UsrSuperMarketDescription_FieldDefaulting(PXCache cache, PXFieldDefaultingEventArgs e)
        {

            var row = (Location)e.Row;
            LocationExt line = new LocationExt();

           
            CSAttributeDetail Description2 = (CSAttributeDetail)e.Row;
            if (line.UsrSuperMarket != null)
            {
                line.UsrSuperMarketDescription = Description2.Description;

            }

        }

Hi @ShahidaValiSyed04  I think you will get Description2 value is NULL.

CSAttributeDetail Description2 = (CSAttributeDetail)e.Row;

 

You can do like below

  • Do a BQL based on the Super Market selected value i.e. SUPERMARK and then get the Description of it and then assign it to the Super Market Description field.

 


Hi @Naveen Boga actually I need based on “ValuID”  

 


It depends on your DAC structure and fields.

Looks like you are using Attirbutes (CSAnswers) for your values and descriptions.

Could you share the definition of your DAC fields and logic?


Hi @ShahidaValiSyed04 were you ever able to resolve your issue? Thank you!


Reply