Loading
Uniconta
Search
Generic filters
Free trial signup
  • Visit a Country Site
    • Dansk
    • Uniconta GermanyDeutsch
    • Eesti
    • Uniconta GermanyÍslenska
    • Lietuvis
    • Uniconta NetherlandsNederlands
    • Norsk
    • English
  • Search
  • Uniconta
    • What is Uniconta ?
    • Modules
    • Ledger
    • Customer
    • Sales Order
    • Vendor
    • Purchase
    • Inventory
    • Logistics
    • Project
    • Light Manufacturing
    • CRM
    • Fixed assets
    • Dashboard
    • Company
    • Adaptability
    • Uniconta Assistant App
    • Uniconta Upload App
  • Download
    • Uniconta for Windows
    • Uniconta for Mac
    • Download for Developers
    • Free trial signup
  • Resellers
    • Find a reseller
    • Become a reseller
    • Uniconta Partner info Login
    • Uniconta Partner info Sign up
  • Developers
    • Become an integration partner
    • Documentation
    • Samples
    • Downloads
  • Accountants
    • Become a Univisor
  • News Overview
    • Blog
    • News
    • Uniconta Update
    • Customer cases
  • About us
    • About us
      • Management
      • Contact
      • IT Security ISAE 3402
      • System status
    • Terms & Conditions
      • License Agreement
      • Data Processing Agreement (DPA)
      • Privacy policy
      • Cookie policy
      • Sub-processors

Developers Unipedia

  • API
    • API
    • User defined fields
    • User defined tables
    • Saving a Session
    • Posting an Invoice
    • Post Invoice and get PDF
    • Localization
    • Attach physical voucher to entities
    • Server-Login User
    • How to find C# Property from Uniconta Label
    • Minimize network traffic and optimize speed
  • Plugins
    • Plugins
    • Debug Uniconta Plugins
    • Refreshing UI with plugins
    • How to use Uniconta Plugin
    • Develop a user plugin
    • Event Handling
    • Global Script
    • How to capture menu events
    • How to open a form in Uniconta from Plugin
    • Open new content in a IContentPluginBase plugin
    • Adding plugin in a menu
    • How to add user parameter in plugin menu
    • How to create plugin with Devexpress Library
    • Synchronize Entity Support in form page
    • Develop a PageEventBase Plugin
    • Logging Exceptions on local machine
    • Create Custom Uniconta Pages From Github Code
    • Web frame integration
  • OData
    • CRUD operations in OData
    • ODATA REST API – Testing with Postman

User defined fields

2,247 June 26th, 2018 June 28th, 2018 2 minutes
Print Friendly, PDF & Email

Setting up

You can create user defined fields in the Tools/User defined fields menu.
Choose which table you would like to add a new field to, e.g. ‘Inventory’, ‘Sales orders’ etc.

 

 

 

 

 

 

 

 

 

 

 

The two most important fields to set are ‘Name’ and ‘Type’. ‘Name’ being the name of the field in the database, and ‘Type’ being its type, e.g. String, Integer, Boolean etc.

‘Group name‘ is used if you wish to group the field. It will create a box around the field in the WPF client with the group name above.

The ‘Reference’ field is used if this field will act as a foreign key to another table. This includes user defined tables.

The various properties can be set on the field, e.g. ‘Read only’, ‘Delete’ etc.

  • ‘Read only’ means that the field cannot be written to.
  • ‘Delete’ means that the field is no longer used.
  • ‘Mandatory’ means that the value of the field must be set before an entity can be created.

Furthermore, various SQL properties can be modified for the field as well.

Now click ‘Save’ to save the new user defined field.

Example

For this example, we will create a user defined field for ‘Inventory’ items, called ‘Rare’, using the specification beneath.

Click the ‘Generate C# class’ and pick ‘Client class’ from the drop down.

This gives me the following class:

public class InvItemClientUser : InvItemClient
{
	public bool Rare
	{
		get { return this.GetUserFieldBoolean(0); }
		set { this.SetUserFieldBoolean(0, value); }
	}
}

Now, simply paste this code into your project.

To use this new class, simply replace it with the use of InvItemClient. For example in this Execute method of a plugin:

public CrudAPI crud { get; set; }
public ErrorCodes Execute(...)
{
    var ruby = new InvItemClientUser
    {
        Item = "Ruby",
        Rare = true,
        CostPrice = 25000,
     };
    return crud.Insert(ruby).Result;
}

Now after running the above code. The Inventory item ‘Ruby’, has been inserted into my Inventory items as seen below.

 

 

 

 

Categories: API, Developers Unipedia
Home » Developers Unipedia » API » User defined fields

Get in touch with us

Uniconta

  • Uniconta
  • Modules
  • Downloads
  • Free trial signup
  • Subscription Terms
  • System Status

PARTNER

  • Become a Reseller
  • Uniconta API key application
  • For Developers
  • For Accountants (Univisor)
  • Uniconta Partner info

INFO

  • News
  • Updates
  • Customer cases
  • Video
  • IT Security
  • About us
  • Management

Support

  • Unipedia
  • API information
  • Contacts
  • Visit a Country Site
    • Dansk
    • Uniconta GermanyDeutsch
    • Eesti
    • Uniconta GermanyÍslenska
    • Lietuvis
    • Uniconta NetherlandsNederlands
    • Norsk
    • English
Uniconta
© Copyright 2019 | All rights reserved | [email protected] | Terms & Conditions
Facebook LinkedIn Youtube