Skip to main content

Posts

Showing posts from October, 2009

Check on which tier code is running.

A colleague of mine needed to determine (runtime) what ax-tier his code was running on. We digged around, and he came up with the solution: if (isRunningOnServer()) { // Server } else { // Client } As a footnote he needed this check to make some code to refresh the AOS-code cache, when implementing quick-fixes to an environment running with multiple AOS-instances.

Merging code/elements in Layers

I've been assigned a task where the merge between VAR and CUS-layer of the application is necessary. I like to make my self a TO-do-list of elements to be processed, so I can check an item when it is done. I wrote a small job to identify elements in the application that were represented in both VAR and CUS-layers thus representing a potential layer-conflict. The job produces an info-log with the potential conflicts that can be copied in to Excel to be used as a TO-DO-list. static void JSOVarVapAndCusConflictsJob9(Args _args) { UtilIdElements utilIdElements; UtilIdElements VarVapUtilIdElements; Map elemMap; MapIterator elemMI; UtilElementType recType; RecId utilId; int pos; str 60 elementName; elemMap = new Map(Types::String,Types::String); while select UtilIdElements where (utilIdElements.utilLevel == UtilEntryLevel::cus) && UtilIdElements.parentId == 0 {