Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Custom Archives - SOWeb

Hi again,

I fixed the sorting in the CustomArchives for SOWindows and have now configured the Archives for display in SOWeb

I have noticed though that the sorting does not work at all in the SOWeb archives

In the Project Linked Sales Archive that I have wrote I am also not able to right-click the headers to get the Column Chooser or Sorter menu to appear

In the Project Linked Activities Archive the menu does appear but it affects the SuperOffice Project Activity Archive rather than my Custom archive (and switches context to it when the menu is closed)

Waht have I missed doing as this probably should be working (I didn't have to do anything in SOWin to get these menus to appear)


Cheers James

RE: Custom Archives - SOWeb

HI James,

Several things... In web, you have to declare your new control and what actions it can handle, including opening the configure columns/sort dialog.

You can discover all of the requirements and configuration options by reading about Custom Archives in the SuperOffice Web documentation.

In reference to the sorting issue... Does your custom archive provider implement SetSortOrder, and then use those arguments in the GetRows method?

Hope this helps!

Af: Tony Yates 3. sep 2020

RE: Custom Archives - SOWeb

Thanks Tony, I'll be sure to read through those articles

Cheers James

Af: James Carter 3. sep 2020

RE: Custom Archives - SOWeb

Hi Tony,
so do I need to create another merge file for SoMenuConfiguration.config
and with reference to this question:
"In reference to the sorting issue... Does your custom archive provider implement SetSortOrder, and then use those arguments in the GetRows method?"
No, I have no code for SetSortOrder - I assume you mean SetOrderBy?
If so, it is implemented but is empty:

 public void SetOrderBy(params ArchiveOrderByInfo[] orderBy)

Cheers James
Af: James Carter 3. sep 2020

RE: Custom Archives - SOWeb

Win talking here...
By default the Win client sorts archives from in-memory data after the archive is completely loaded.
But Win also has a means of letting the provider sort during the load phase.


(just so you know)


Af: Conrad Weyns 3. sep 2020

RE: Custom Archives - SOWeb

Hi again,

I now have the menu displaying after defining it in a menu merge file
I am getting the following error though when the column config dialog opens

The provider/guiname archiveColumns:ProjectSalesProvider/ProjectSalesGUIName is not known. Please check the config section of your ArchiveColumnConfigDataHandler
Source: SuperOffice.CRMWeb

Thanks James

PS Thanks for additional info the SOWin Archives Conrad

The SOProjectPage Merge files looks like this:

	<page id="ProjectPage">
		<datahandler id="ArchiveColumnConfigDataHandler" type="ArchiveColumnConfigDataHandler">
            <archivecolumninfo mergeaction="insert" guiname="ProjectSalesGUIName" providername="ProjectSalesProvider"/>

and the definition of the menu in the menu merge file is:

  <menu context="archive" subcontext="projectlinkedsales" id="0" position="below" group="mainmenu" displayaccesskeys="false">
      <menuitem id="archivesort" type="normal" trackingId="archive.projectlinkedsales.sort">
      <menuitem id="" type="divider" />
      <menuitem id="archivesortconfig" type="normal" trackingId="archive.projectsale.sortConfig">
        <url>"archiveconfiguration", "archiveconfiguration[dialog=stop].sortorder?provider_name=ProjectSalesProvider&amp;gui_name=ProjectSalesGUIName","VygonProjectSalesArchiveArchiveControl.Refresh();");</url>
      <menuitem id="archivecolumnconfig" type="normal" trackingId="archive.projectsale.columnsConfig">
        <url>"archiveconfiguration", "archiveconfiguration[dialog=stop].columns?provider_name=ProjectSalesProvider&amp;gui_name=ProjectSalesGUIName","VygonProjectSalesArchiveArchiveControl.Refresh();");</url>
      <menuitem id="" type="divider" />
      <menuitem id="archivesorthelp" type="normal" trackingId="archive.projectsale.listHelpSort">
      <menuitem id="archivecolumnresize" type="normal" trackingId="archive.projectsale.listHelpResize">
Af: James Carter 4. sep 2020

RE: Custom Archives - SOWeb

Hi again,

I noticed some comments on other posts about certain names having to be lower case so I chnaged the Provider Name and GUIName to be lower case and the menu now works :)

Column Header clicking to sort does not seem to work though :( Does anyone know what I have missed here? Is it the C# in public void SetOrderBy that needs coding up?


Cheers James

Af: James Carter 4. sep 2020

RE: Custom Archives - SOWeb

Hi James,

Yes, if you expect sorting on columns to work in the archive control, you should expect to implement sorting logic in your archive provider GetRows method.

In reference to the error, have you added a merge file for SoArchiveColumnList.config? Snippet from the docs:
Hope this helps!
Af: Tony Yates 4. sep 2020

RE: Custom Archives - SOWeb

Hi again!

I'm not sure what to put to in the SetOrderBy

Do I have to convert the sort array to a string and pass that as a parameter to a new call to GetRows(....)?

If I do then I will still need a custom sorter as the archive is made up of two separate queries - any ideas on this one?

Also since editing some of the names (provider and gui) in the code to keep the menu control happy one of the archives is throwing a DCF error that is stopping SOWeb from opening after logging in (SoWindows is perfectly happy so my guess is a config file)

The exception details displayed do not show which bit of code\configuration is causing this - any tips on debugging it?


Cheers James

Af: James Carter 9. sep 2020

RE: Custom Archives - SOWeb

Hi James,

You seem to have two separte issues here.

The first, dealing with SetOrderBy is quite straight forward. If you have created your own archive provider (by inheriting from IArchiveProvider), then you are responsible for accepting the arguments passed into SetOrderBy and determine how best to construct your query(ies) and process the results based on the array of ArchiveOrderByInfo.

The second, dealing with tangled persisted archive control configuration is tricky. 

Two things:

  1. Don't reuse the same names (gui, context, subcontext, etc) as you are essentially hijacking the other archive controls and messing with their state. It's even mentioned in the docs... Don't do that. ;-)

  2. These column configurations are persisted in the database.  This is mentioned in the docs I referenced earlier:

What's not mentioned in the docs however is that if/when you do change these keys, you have to either update the offending row in the SuperListColumnSize table, or simple purge all rows in that table with your associate ID. When building these myself, I tended to do the latter. 

This should correct your sign-in issue. If not, you're going to need to provide more logging details than "throwing a DCF error..." :-)

Hope this helps!

Af: Tony Yates 9. sep 2020

RE: Custom Archives - SOWeb

Hi Tony,

thanks for the tips - I have now renamed everything and am getting a bit further in the load process.

I am now getting a pop-up window with the below error (Object with mapping name not found)

Any tips on where to look for my possible renaming error?


Cheers James



The given key was not present in the dictionary.
Source: mscorlib
Click here to see stacktrace

at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at SuperOffice.Util.ReaderWriteLockExtensions.WithReaderLock[TResult](ReaderWriterLock theLock, Func`1 body)
at SuperOffice.DCF.Web.ConfigurationManager.GetObjectMapping(String mappingName)

Click here for more information

Object with mapping name: not found.
Source: SuperOffice.DCFWeb
Click here to see stacktrace
at SuperOffice.DCF.Web.ConfigurationManager.GetObjectMapping(String mappingName)
at SuperOffice.DCF.Web.Factory.ClassFactory.CreateObject(String name, Type type, Page page, Object[] constructorArguments)
at SuperOffice.DCF.Web.UI.Controls.PageBuilder.InitializeDataHandlers(XmlNodeList datahandlerNodes)

Unable to initalize datahandler.
Source: SuperOffice.DCFWeb
Click here to see stacktrace
at SuperOffice.DCF.Web.UI.Controls.PageBuilder.InitializeDataHandlers(XmlNodeList datahandlerNodes)
at SuperOffice.DCF.Web.UI.Controls.PageBuilder.Initialize()
at SuperOffice.DCF.Web.UI.Controls.PageBuilder.OnInit(EventArgs e)
Af: James Carter 11. sep 2020

RE: Custom Archives - SOWeb

Hi James,

If you issue request with ?&flush in the URL (can do that in the browser), to purge any configuration changes, does that help?


Af: Tony Yates 11. sep 2020

RE: Custom Archives - SOWeb

Hi Tony,

One both archives work, next day only one does then only the other one! 

It wasn't the SuperListColumnSize or user preferences as I repeatedly deleted them, as suggested, ?flush, iisresets made no difference :(

It turns out that most of these errors were being caused by a corrupt database, using a different test database I had no issues.

Thanks for your assistance so far but do you have any sample C# code for the SetOrderBy?

Many thanks again :)

Af: James Carter 18. sep 2020

RE: Custom Archives - SOWeb

Hi Again!


I now have one archive sorting correctly on both Column Header click and using the Configure Sort Order Menu

The other Archive is now sorting correctly on Column Header Click, the Configure Sort Order Menu appears but upon closing does not fire the SetOrderBy 

I have tried comparing  the merge files for the two but cannot spot the error :(

Is there any particular reason why one type or sorting (column click) would work and the other not



Cheers James

Af: James Carter 23. sep 2020

RE: Custom Archives - SOWeb


fresh eyes on a new day - spotted the typo straight away :)

Everything is now working, thanks for your help and guidance


Cheers James

Af: James Carter 24. sep 2020