When adding a new custom feature switch i get an error when changing another feature due to the null value in the new feature switch field. How can i prevent this?
[PXDefault(false, PersistingCheck = PXPersistingCheck.Nothing)] doesn’t help here!
When adding a new custom feature switch i get an error when changing another feature due to the null value in the new feature switch field. How can i prevent this?
[PXDefault(false, PersistingCheck = PXPersistingCheck.Nothing)] doesn’t help here!
I have always used CustomPlugin class to set the values in the db. Essentially ran the sql equivalent of:
update featuresset set Newfield=false where Newfield is null
When you publish the vales will be set to whatever you want the defaults to be, and once set, even if the customplugin runs again, nothing happens as your filter is for when there is no value.
The problem I found is that the default tools are for new records, given that featuresset only has one record, the default doesn't seem to work correctly. Not sure but think it's related to how the screen and the feature attribute works.
For existing records with uninitialized user fields we have “PXDefaultAttribute(PersistingCheck = PXPersistingCheck.Nothing)]”. But unfortunately this doesn’t work here.
Yeah, it's like the feature attribute overrides that, that's why i had to set the values in the CustomPlugin
Hi
For the customization, you can refer - https://asiablog.acumatica.com/2021/10/add-new-custom-feature-to-the-enable-disable-features-screen-cs100000.html
Feature(false, typeof(FeaturesSet.commerceIntegration), null, DisplayName = "New Feature")]
Above, the highlighted text is missing your DAC file. Which is the default value for the field.
Screenshot is from the last of several tries.
Not sure why it is not working for you, please reach out to the Acumatica support team by creating a support case OR
FeatureAttribute constructor needs one change:
Yes,
I don’t think any changes are required to the FeatureAttribute.
if we provide like the below at the DAC level, internally automatically it will invoke the constructor and taken care of the default value as FALSE
oFeature(false, typeof(FeaturesSet.commerceIntegration), null, DisplayName = "New Feature")]
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.