I need to remove Out of the box attributes from Backoffice, these attributes are defined in the multipe OOTB extensions.
I am not sure if you want to hide these attributes from backoffice or you want these attributes to be removed completely from the database.
If you just want to hide them, you can add the following custom property for these attributes in the items.xml:
<custom-properties>
<property name="hiddenForUI">
<value>Boolean.TRUE</value>
</property>
</custom-properties>
Please check core-items.xml for some examples.
Alternatively, you can import the following ImpEx:
INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];hiddenForUI
;the-attribute-to-be-hidden;the-itemtype-to-which-the-attribute-belongs;TRUE
If you want them to be removed completely from the database, you can do the following things:
Identify the extensions in which they have been defined and if any of these extensions are not required, just remove them from localextensions.xml
Remove these attributes from their respective items.xml
Then, you need to execute ant clean all updatesystem. However, the columns corresponding to these attributes will still persist in the database as system update does not remove/drop any table/column from the database (you can only add new tables/columns and add/update/remove the data using system update). In most of the cases, system initialization is also not a possibility. So, you are left with only one option, which is to delete the columns from the database using the SQL queries.
Related
I tried to save data-attribute inside a span tag. After saving it`s removed.
I tried the following configurations in my custom yaml file.
processing.allowAttributes:
-'span[data]'
processing.allowTags:
-span
editor.config.extraAllowedContent: "*(*)[data-*]"
Nothing helped.
Where is the problem?
To allow saving data attributes to db from RTE fields, you need to ensure that:
1) RTE (CKEditor) will not strip the attributes. This is configurable using extraAllowedContent. Below is an example how to allow id attributes additionally to the default rule which allows data attributes and classes.
editor:
config:
extraAllowedContent:
- "*(*)[data-*]"
- "*[id]"
If you only need to add data attributes, you don't need the configuration above and can relay on default configuration (from rte_ckeditor/Configuration/RTE/Editor/Base.yaml), as data attributes are allowed by default there.
2) then you need to configure PHP side of things - data transformation which happens before data is saved to db. See manual chapter: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Rte/Transformations/Process.html#transformations-process
Below is an example (taken from RTE yaml preset) of allowing data-abc attribute in transformation (in addition to attributes which are allowed by default).
processing:
allowAttributes: [class, id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop, data-abc]
So in your case you were missing proper allowAttributes configuration.
I have a custom table in SQL Server called AnimalBreed and maintenance page.
I wish to add User Defined Field support via the KvExt approach instead of
traditional practices involving either CSAnswers or a CacheExtension of the
DAC and underlying "Usr" fields.
Is this possible?
Can it be done for line-level (child) DACs, such as
existing INLocation and INLocationKvExt?
Thanks!
UPDATE:
It appears the feature needs at least:
ensure your table has the NoteID column as uniqueidentifier datatype and the DAC has the corresponding field: Guid? NoteID and [PXNote()] attribute.
In the ASPX, if not ListView, add the following to the PXDataSource tag:
EnableAttributes="true"
By making these changes, I can Manage User Defined Fields, choose Attributes to include, and I can store values to the KvExt table.
I am using Version = 19.205.0023
Sales Order page observation: if I add two UDFs on SO Order Entry page, one is combobox and one is checkbox, setting their values saves just fine, but then updating the combobox and save leads to loss of the checkbox (from true to false), unless you uncheck and recheck prior to the save. Is this a bug?
Maybe technically possible but definitely not recommended to use undocumented feature like KvExt.
If you need to deploy User Defined Fields on a page which already contains them. Configure them manually and then add them in a customization package in the user defined fields section for deployment as described here:
https://help-2019r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=e01f29d3-b6b1-40f4-a2d1-45c9d01bdde3
Example:
I wanted to add an extension in backoffice, so that it is possible for non-programming people to add new objects (of defined types) to the database.
I've almost done it:
I defined two items: offer and tile (their relation is one to many)
What i achieved is there is a possibility to add a new offer in the backoffice.
When you add it, and click to edit, you can also add a tile to this offer - either form drop-down list (if any tiles exist) or create a new tile, which will automatically be added to its table and realted to edited offer.
However, the representation of the drop-down list is unacceptable, see below:
screenshot from backoffice
as you can see, the identifier of an existing tile (within []) is its PK - which clearly is not a good identifier. I would like to inject there instead a value form one of tile's other attributes (which also is unique) so that someone could easily identify which tile to add.
Where is the mechanism responsible for it? How to override it. I tried to override toString method in the tile class, unfortunately to no avail
You need to customize the backoffice-config.xml for your custom Model. For your Tile model, you can use something like:
<context merge-by="type" type="Tile" component="base">
<y:base xmlns:y="http://www.hybris.com/cockpit/config/hybris">
<y:labels>
<y:label>nameOfTile</y:label>
</y:labels>
</y:base>
</context>
When beginning to develop against SharePoint I did not fully understand all the ins and outs initially. I created a list definition (for a document library) and associated various custom actions to it. Unfortunately, I used the following for the list definition itself:
<ListTemplate...
...
Type="101"
...
And to register the CustomActions against the list:
<CustomAction...
...
RegistrationType="List"
RegistrationId="101"
...
Of course, this means that the custom actions are visible for all document libraries where the feature is activated which is undesirable behaviour. Also, there are lots of these document libraries that have been created from the above list definition in production.
What is the best way to fix this problem? My assumption is that I somehow need to change the "Type" attribute of the already existing lists, but I do not know how to do that. Can it be done via some direct SQL manipulation perhaps? Or is there a better way?
Note: I can see that the AllLists table has a column tp_ServerTemplate, is that the right thing to change?
Modifying the SharePoint database is completely unsupported by Microsoft. Please do not do this on production!
Another option is to create a content type and associate the custom action with that. You may need to write a simple console application to iterate through your existing document libraries and add the content type so it is available for use. The existing documents that you'd like the custom action to apply to would need their content types changed as well.
From some quick initial testing it does look like changing the AllLists table does the trick.
So steps to resolve:
1) Change List Definition Type attribute to be a unique value (for example 11000)
2) Change the CustomAction RegistrationId attributes to be the same (11000)
3) Update the tp_servertemplate column in the AllLists table to be the new template Type (11000) for all the relevant lists.
I have a data model that includes common columns like addedBy, editedby (user), addedDate, editedDate.
Is there a setting I can use in SubSonic 2.1 that will automatically update these fields appropriately instead of having to explicitly specify in every update?
Check out http://subsonicproject.com/setup/subsonic-conventions/. SubSonic uses a convention-based approach when it comes to audit columns. If you can change your column names to CreatedBy, ModifiedBy, CreatedOn, and ModifiedOn respectively, then they will be updated automatically. I don't think there's a way to change what those names can be without making changes to the SubSonic source code.