Skip to content

Przydatne Metody

Configuration

Configuration - GET

C#
1
2
3
configurationByID(string ID, string description = null, string defaultValue = null) //with cache
configurationByIDNoCache(string configurationid)   //withot cache
cc.data.common.configurationByID("instance.warehouse.documentitemlist.organisationUnitID", false, "Pokazuj wydział na liście pozycji dokumentów");

Configuration - SET

SQL
1
2
3
4
5
6
7
--zapisanie pojedynczej wartosci

EXECUTE @RC = [configuration].[setup]
   @configurationid
  ,@value
  ,@description
  ,@force
C#
1
2
3
4
REST ActionResult updateField("configuration.configuration.value", string dataid, string datavalue, string dataregion = null)
//w namespace uzytkownika
REST ActionResult updateField("configuration.configuration.user.namespace", string dataid, string datavalue, string dataregion = null)
REST cc.fnUpdate(dataobject, dataid, datavalue, dataregion)

Configuration UI

Miejsce ktore korzysta z klucza powinno byc oznaczone atrybutem Umozliwi to wyswietlenei na danym ekranie ew parametrow konfiguracyjnych

HTML
<div data-configuration="instance.order.sales.specification"> </div>

Cache - pobieranie, zapisywania

Cache oparty jest na - region, source np: [firmID] - key np: 562ED69D-C34B-E511-82DE-083E8E98C8A4

C#
1
2
3
4
5
6
//GET
if (cacheRegion != null)
var x = cc.cacheSystem.getCache().Get(cacheRegion, hash);
//SET
if (cacheRegion != null)
cc.cacheSystem.getCache().Add(cacheRegion, hash, result); //CACHE

Generic get

C#
cc.data.common.Get(key, region)