Udefs on Sale missing/invisible in Settings
this is a SuperOffice CRM OnSite 10.2 Release_OnSite_10.2.1_2023.01.31-02
I received a call after quite a long time since last that my contact wanted to add/edit some udefs on a sale card.
Note below for current page in regular program:
However; switching to settings, there are no visiblle fields:
Thre are however visible fields as it concerns the company udef page:
suggestions welcome.
All Replies (9)
Hi Eirik,
This usually happens when the version numbers of the Udef are corrupt due to multiple changes/failed publishes/working with multiple people in the CRM admin on fields.
Do you have a revert button on the bottom right that you can click? Otherwise this is something you will have to fix on database level. Since your 'AdminUdefVersionsale' is propably pointing to a version number where no actual user defined fields are defined on.
David
Really Appreciate your comment. As to your question: there are no buttons (publish/revert) visible (see the second screenshot)
Yes, it is a db table issue. (since the udefs on company shows up)
What do I look for in terms of AdminUdefversion sale, and where is it and what should it be compared to,etc.
Hi Eirik,
If you do the following query:
select * from crm.userpreference where prefkey = 'AdminUdefVersionsale' or prefkey = 'CurrentUdefVersionsale'
Then the AdminUdefVersion should be 1 higher then Current, is that the case?
And if you run the query below, to see the fields defined that are on the AdminUdef version, do you get a result, or are there no fields listed?
select * from crm.UDEFFIELD
where ownerTable_id = 10 -- sale
and version = (select prefvalue from crm.userpreference where prefkey = 'AdminUdefVersionsale')
David. Thank you again.
See below results from queries I ran on that db
so, If I read that correctly, the adminudefversion is one higher than the current.
the second query returns no results as I see it.
thank you
Hi Eirik,
Pretty sure that you can just set the admin udef version equal to the current udef version, to get the fields back from the latest published version, and go further from there.
NOTE: It has been a while since I had to fix this, so take a back-up of the database before trying this.
SQL script:
update crm.USERPREFERENCE
set prefvalue = (select prefvalue from crm.userpreference where prefkey = 'CurrentUdefVersionsale')
where prefkey = 'AdminUdefVersionsale'
Propably need to do a flush/relogin before the changes shows up in the admin.
David
Thank you again... I did a backup, and ran the update script.
The good: the udef fields are now visible again in settings and maintenance, and, the fields can be moved around.
The bad: When attempting to add a new field, the following comes up (with a message about what I think is a db error causing a immediate shut down: