Skip to main content
Answer

Replace PXStringList with PXSelector

  • September 19, 2023
  • 2 replies
  • 109 views

mawe4585
Freshman II

Hello Community,

in CRCase there is a field called “Priority” it uses the CRCasePriorityAttribute to get its values from a PXStringList.

 

Now I want to values to be stored into the DB by a DAC.

I created the DAC and I also tried building a DAC Extension on CRCase.

However it seems it doesn’t work.

So far the Extension looks like this:

public class CRCaseExt : PXCacheExtension<PX.Objects.CR.CRCase>
{

#region Priority
[PXDBString(1, IsFixed = true)]
[PXDefault('M')]
[PXUIField(DisplayName = "Priority")]
[PXSelector(
typeof(Search<CRCaseMyPriority.priorityId>),
typeof(CRCaseMyPriority.priorityId),
typeof(CRCaseMyPriority.priorityValue),
typeof(CRCaseMyPriority.sortOrder),
DescriptionField = typeof(CRCaseMyPriority.priorityValue)
)]
public virtual String Priority { get; set; }
#endregion

}

When I publis this the DropDownList of the Priority gets empty and no values are there to select.

The DB however is populated and also the Maintenance Screen of the DAC ist showing the records from the database.

Can you give me a hint on what may be missing or maybe just wrong?

Best answer by darylbowman

If you are changing from a combobox field to a selector, have you removed the combobox control and added the selector version instead? I'm not positive this is necessary, but your code looks pretty good to me.

Maybe post your DAC as well?

2 replies

darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • September 19, 2023

If you are changing from a combobox field to a selector, have you removed the combobox control and added the selector version instead? I'm not positive this is necessary, but your code looks pretty good to me.

Maybe post your DAC as well?


mawe4585
Freshman II
  • Author
  • Freshman II
  • September 19, 2023

Yes, just found that as well and qanted to post the solution. You were faster. Thank you!