次の方法で共有


Custom Attribute Changes Not Saving

An interesting issue over the last couple of days. I had created a couple of management packs which simply extended a class. You could follow any guide on the Internet to do this. However what I was finding was that I would import the new management pack, open an object, add some information in the new field, click apply. The issue was that none of my changes were saving.

I did some deep troubleshooting and even learned a couple of things along the way. For instance when you add a new class extension two new tables are created in the database – name MT_ClassExtension<GUID> and MT_ClassExtension<GUID>Log. The first table holds all the affected objects – in this case Active Directory Users (just the EntityID) and a second column containing the new attribute and all the values associated with it. I noticed that for my management pack all these values were null.

Even when I edited the database (not supported) and added my own values they were not reflected in the console.

Using SQL profiler I noticed that when I updated an already existing attribute – a lot of things happen in SQL – primarily an Update statement is performed and I could see the new value being inserted. This was not happening for my new class.

I tried restarting all the services and flushing the cache but to no avail. In the end the only fix for this was rebooting the management server – not a good outcome.

I had tried sealing the management pack, collapsing all my extensions into one management pack – even replicating the issue on my other lab.

In the end I found the answer hidden at https://social.technet.microsoft.com/Forums/systemcenter/en-US/81e0213f-59fb-4bcf-8ad2-411fca18d385/customized-view-not-saving-data-fields?forum=customization . All that was needed was a console restart. This is due to the fact that the new binding – even though I hadn't customized a form requires a restart of the console. This will disconnect and reconnect the user to the SDK.

In short before panicking because your new management pack isn’t saving values – try restarting the console :)