Przydatne Metody
Configuration
Configuration - GET
C# 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 --zapisanie pojedynczej wartosci
EXECUTE @ RC = [ configuration ].[ setup ]
@ configurationid
, @ value
, @ description
, @ force
C# 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# //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 )