version: 5.20.1752
I have created one custom dropdown control on contact form CR302000, the control looks good on screen, but the value of the control can't be saved (no error, but just nothing is saved), nor loading data from database.
I also have a custom textbox on that screen ,saving and loading the value of it both are working okay.
here is DAL code for dropdown:
[PXStringList(new string[] {"1","2","3"}, new string[] {"EN","FR","BI"})]
[PXDefault("1")]
[PXUIField(DisplayName="Language")]
What should I do to make custom dropdown to work?
Thanks
You can delete your column from the table manually using your preferred Db mgmt tool (eg. SQL Management Studio). Or if the client is hosted, you can create a SQL script which drops the column from the table. Then publish that SQL script.
Since you use version 5.20, consider building an extension table and DAC extension, for your user field. You can find the details to create them in the Acumatica T300 course.
Jeff is correct. You need to use the proper declarations - PXDBString, not PXString. What is the name of your DAC that you work with? Make sure it is not a PXProjection.
Related
I'm using Kentico MVC v12 with a fresh installation of DancingGoat(MVC) template.
I've modified the "E-commerce" module by adding a new column in the "Order" table.
I would like to be able to see it on the "Order" module in the list page.
I see in the "User interface" tab that it uses an "aspx" page.
In it I see that it calls an "ascx" page that uses a "UniGrid" component and specify the columns directly in a data attribute.
I don't like the idea to modify this file to display my new column because I see this website as the foundation of my next features, I would like to avoid as much as possible to touch the code of the website template, do you know if there is an other way ?
Maybe I'm missing a configuration somewhere else ?
Thank you by advance !
Update 06-03-2019:
I tried the solution of Peter Mogilnitski but it doesn't work :x
I added the column in the data source
Then I checked the column in widget configuration
Nothing is displayed
I debugged the sql query, I don't see my column in the query, is there an other configuration to do somewhere else ?
Update 08-03-2019:
The support of Kentico confirmed that the solution I proposed that was confirmed by #Rui was the right way to do it.
Thank you everyone !
If you want the custom field to appear in the UI, you will have to make change to the ascx page. You will need to make a note to that because you will likely need to update it during upgrade or hotfix (less likely)
Other than adding the data field to Columns, you will also need to add ug:column to the section
<ug:Column Name="SAPID" Source="SAPID" Caption="SAPID" Sort="SAPID" />
Yes. There is. This is the widget called orders:
You need to go to widgets, select orders widget and add your column to visible columns
Now go to store overview:
Click on properties of latest orders (this is orders widget used all over the store) and scroll down to column and make your column checked.
I have been extending Acumatica screens by adding new fields accordingly. However, for this particular scenario, I want to create a new tab in the Cases screen.
This tab would include a list of items. These list of items would be a custom table that I will be adding to Acumatica.
Is this possible?
And is this the correct list of Steps?
1. Create table in Acumatica for the list of items
2. Create DAC for the new table
3. Extend the Cases Graph and add a new Data View (i.e. PXSelect)
4. Edit the Cases screen so that a table and grid are added accordingly
5. Link the grid to the Data View through the Data Member property
I am not sure whether you would also need to implement some additional events, but I believe that if the DAC has the correct link to the Case and the correct attributes ... it should work.
Would be much appreciated if someone helps to confirm the above approach please.
Adding a tab page containing a grid bound to a DataView on a custom DAC in the case entry screen is a supported scenario.
There are a few ways to do it. Whether you are working on a Customization Project or an Extension Library will influence how you approach this requirement.
Your steps seems all right. Here's how I would do it in a Customization Project:
Create a new table in the database using a DB management utility (ex: SQL Server Management Studio). Restart WebSite instance or IIS to make sure Acumatica picks up DB schema change.
In DB script section of the customization project, add the new table and check import table schema from database. This will ensure publishing the customization project will create the table in the database.
Create a new DAC for the new table, DAC name should be the table name.
Extend the case entry graph (CRCaseMaint) and add a new DataView on your DAC.
Edit the case entry screen (CR306000), add a TabPage and a grid.
Bound the new grid to your DataView using the DataMember property
Is it possible to add additional properties to a document library in SharePoint using OOTB or Customization?
By default Document library has properties like Title, Description.
I need to add an other custom property in a library level which i can use it for further purpose.
Appreciate your inputs..
Thanks,
Gnanasekhar K
If you want to have metadata for folders/Library, You can look in to "Document Sets"(OOTB)
You can create columns and even run workflows on it.
You can add custom columns to document library. Navigate to document library settings and click on add new column. Or Alternatively click on Create Column option in the ribbon.
Choose the column display name, data type and other properties like default values, choice options etc. (depending upon the type of column you intend to create) and click on OK button.
You would be able to see the column in the default list view. You will also be able to capture the column's value for each document (after you upload it) via Edit properties form.
Refer [this][1] article for more details
For storing metadata for document library, you can use property bags. Property bags can be associated with
farm
web application
site collection
site
list/library
You can do this using
Powershell script
CSOM code
JSOM code
I need to create a view in a page and this view must contain only the last created record. I tried with view filter but it doesn't allow to get the last
created record. Is there any way to do this please?
Thanks in advance,
Create a system view on your target entity that is sorted by createdon descending and then publish the entity. This query will return multiple records, and the most recently created one will be at the top.
Download the XrmToolbox, unblock the zip, and extract it somewhere on your hard drive.
Download FetchXML Builder XrmToolbox plugin, unblock the zip, and extract it into XrmToolbox's plugins folder.
Start XrmToolbox, connect to your org, and click the FetchXML Builder tool.
Open -> View -> specify your entity (I had to play with the autocomplete box a little bit to get it to work) -> select the view you created in step 1. This will load the view in the builder.
Select the Fetch node in the tree on the left. On the right, you will see a field called Top. Specify 1.
Choose Save->Save View. That should do it!
In my SharePoint List, I have an "Employee" column that is a User type field. I would like to add some custom Business Logic to the processing of this field.
Currently, when the user adds a row, I check to see if the user is an Employee or a Manager and then change the behavior on this column accordingly. I do this by statically rendering the field in my custom "ListForm Rendering Template", just before my custom ListFieldIterator. I simply use a standard SharePoint FormField (and FormLabel) control. In the markup of the FormField control, I specify the FieldName (Employee) and an event handler for the Load event. In this Load event, I will check to see if the current user is an Employee or Manager (using two different SharePoint groups). If the user is an Employee I set the value of the field to the current user (this part works perfectly). I also want to change the field so it can't be modified. I thought I might be able to just change the ControlMode on the field (in the code of the OnLoad Event Handler) to Display, but for some reason this has no effect. The field still renders with the full, people picker editor. Am I not changing the fields control mode soon enough? Or is this simply not the correct approach? The other logic I want to put in is if the user is a Manager, I would like to allow that user to select the person from a list (SharePoint group) of Employees. It may be easier to just use the people picker and limit the selectable users to that group. (I think I can do this with the SelectionGroup property.) Although, it would be better if I could just provide a dropdownlist of users, which I could possibly do with a hidden dropdownlist that I would show and event handlers that I could use (handle event selectedindexchanged) to pull the value selected and populate the (now hidden) Employee (user) field. Does this approach make sense? Assuming all that will work, the real difficulty I am having is with changing the ControlMode (rendering) on the field (when the user is an employee) to a label or some kind of read only control, which is how that field renders when viewing the row, which is why I think if I can just trick the control into thinking it is in Display mode then it should work perfectly!
I am still learning SharePoint, but I am very proficient in ASP .Net. This is why I would like to keep my customizations in this Custom Rendering Template, using code behind and leverage my existing skill set as much as properly.
Any thoughts, opinions or advice? Does anyone know why I can't get the column to switch the "Control Mode"?
I do not think that I fully understand your scenario. Some code samples could help.
But anyway it sounds like you want some heavy customizations of the user field. In that case you might want to have a look at creating a custom field with all its advantages and disadvantages. Have a look at MSDN: http://msdn.microsoft.com/en-us/library/gg132914.aspx
Another option might be - in case you do not want to re-use this column in many list definitions - that you can get away with your custom rendering template and create a custom create/edit form where you implement the specific edit behaviour for the field (plain ASP.NET with some SharePoint controls). Here is a nice walk-through on how to grab a custom edit form from SharePoint designer: http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/05/12/sharepoint-2010-cookbook-how-to-create-a-customized-list-edit-form-for-development-in-visual-studio-2010.aspx
I hope this helps. Kr., Bernd.