By using this website, you agree to our Terms of Use (click here)
I'm wanting to create several drop-down or selector fields in a customization for Cases. Is there a set of good documentation on how to create either classic drop-down fields or selectors? I'd like to do most things with a selector because the user can add additional options as necessary. The best site that I can find for these instructions is https://blog.zaletskyy.com/custom-selector-in-acumatica . Thanks for your help.
Justin,
I'd recommend asking this on StackOverflow. You'll get better help there on customizations:
Thanks. I'll check that out.
Without going into how to add a custom field, here's a sample selector attribute for turning a regular old int field into a selector for CRCase:
[PXSelector(typeof( //What table to look at (CRCase), and what related field you want to save into the DB (caseID). Also a Where to filter for only status = open Search<CRCase.caseID , Where<CRCase.status, Equal<CRCaseStatusesAttribute.Open>>> ) //The fields shown in the Grid. You can add more or less, just keep within the { }s. //To show fields from other tables, you need to add a join into your Search. , new Type[] { typeof(CRCase.caseCD), typeof(CRCase.status), typeof(CRCase.subject) } //The surrogate key. What you'll see as the "Value" in the field , SubstituteKey = typeof(CRCase.caseCD) //Comes after the "-" (EX: customers will have "BAcctCD - AcctName" -> in this case BAccount.acctName is the DescriptionField) , DescriptionField = typeof(CRCase.subject) //Caches the results , CacheGlobal = true)]
Add this attribute to your field and you should be good to go.