Udefs on Sale missing/invisible in Settings

lock
push_pin
done
Besvarat
9

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.

4. juni 2024 | 05:43 em

Allt Svar (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.

 

5. juni 2024 | 07:15 fm

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.

 

 

5. juni 2024 | 12:17 em

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')
5. juni 2024 | 12:22 em

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

5. juni 2024 | 06:10 em

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.

6. juni 2024 | 02:28 em

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:

 

7. juni 2024 | 05:42 em
Are there actually still fields available? Judging from your screenshot it could well be that you have used the max of 60 number fields.
7. juni 2024 | 07:34 em

David

Good catch. Is this about issue id 21783 perhaps ?

 

 

7. juni 2024 | 07:38 em
Most likely, to be able to add any other field you will need to remove 1 number field.
7. juni 2024 | 09:36 em

Lägg till svar