How do you set a field as required in Acumatica ERP?
Have tried making a customization and setting 'Required' as true and 'AllowNull' as false but that doesn't work.
Running version 5.
To make a field required, you must mark it with the [PXDefault] attribute inside the data access class.
Related
I wanna to set up default value if a ProductType attribute is empty or null.
This is the documentation I referred: https://commercetools.github.io/commercetools-jvm-sdk/apidocs/io/sphere/sdk/meta/ProductAttributeDocumentation.html
There is currently no default value that can be defined in product type attributes.
You could create a custom object for that purpose.
How do you plan to manage your product data?
Will you sync from an external system?
I have an edit field that is set to a property.
Now I want that property initially populated with the host name.
Things I've tried so far:
[%ComputerName]
[ComputerName]
{ComputerName}
None of which are working
It's unclear where you put that, but I'm assuming you mean the Property setting for the edit control. That won't work. Instead you need to associate the edit control with a regular property (so it can be updated), and set the value of that property with a Set Property custom action before this is shown.
Note that in order to support supplying the value from a command-line install (especially a silent one) you may wish to condition the Set Property action not to fire when the property already has a value.
To set a default value for this control, make sure the property is a public property by giving it a name that contains only uppercase letters, use the Property Manager view to add the public property, and then assign to it the value of the default selection.
Before accessing this property first you need to set that property. You need to call either SetProperty CustomAction or you need to add that property in Property Manager.
And [COMPUTER_NAME] is the correct way to access it.
I add custom property for my web part. How to add this property in existing category (Appearance). I try set attribute [Category("Appearance")] but in this case my property is in "Miscellaneous" category.
It's not possible, you must add it to your own category, not to one of the built-in ones.
I'm trying to make a field read only when a given value is selected from a PickList.
I'm using a flag that is set to Y when the list has that value, and N otherwise.
I created a Business Component User Prop with the name Field Read Only Field: MyField set to the flag.
Thing is, this works with the vanilla component but it wont work on my custom component.
I can't figure out what is going on, the properties of the fields and flag are exactly the same. It should work...
Thanks for any help you can give me.
That user property is only supported on the business component class CSSBCBase and its subclasses. My guess is that you probably used CSSBusComp as the class of your business component. CSSBusComp is actually a superclass of CSSBCBase, and is very minimal and does not support Field Read Only Field. If that's the case, change it to CSSBCBase and you should be good to go.
Other option is that- if the record become read-only when the picklist value is being selected- that you'll need to make the picklist field Immediate Post Changes to be sure the user property is triggered.
I got to store some user specific data (string) in my Sharepoint webpart.I guess hidden webpart properties should do the trick. Tried with the following attributes on webpart property:
[WebBrowsable(false)]
[Bindable(true)]
[WebPartStorage(Storage.Personal)]
[Personalizable(PersonalizationScope.User)]
But I observe in the webpart that data stored is not user specific. Any help?
How are you reading your data ? You can use the WebPart.PartCacheRead method to retrieve per use values.
web.config can be modified to signal how you want your WebPartCache to be stored. To support caching in database then you must include the [Serializable()] attribute to you custom classes
The WebPart.EffectiveStorage property can also help in determining how the data is stored:
if (EffectiveStorage == Storage.Shared)
{
output.Write("<b>You are now in shared mode.</b>");
}
Just wondering why you have WebBrowsable attribute set as false. Are the users not able to configure the web part ? When and how is the property value set ?