Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Is possible clear use data of Particular Class?

(0) ShareShare
ReportReport
Posted on by 572

Only one user has problems with the display of a report and cleaning the user data resolves the problem, but loses its customization, for this reason it is only necessary to clean the data of the report controller class.

Is Possible?

For example this class

cache.PNG

Thanks in advance

  • ismaelivan Profile Picture
    ismaelivan 572 on at
    RE: Is possible clear use data of Particular Class?

    Thanks Martín,

    it worked! Here I leave this little Job

    private void ClearUserData()
    {
        UserInfo userinfo;
        SysLastValue   syslastvalue;
        Dialog dialog;
        DialogField field1, field2, Items;
        FormBuildComboBoxControl combousers, comboelements;
        Description description;
        int numitems = 0;
        container usercont, elementcont;
        UserId userid;
        Description element;
    
        dialog = new Dialog("Borrar Datos de Uso");
    
        dialog.dialogForm().form().design().left(44, 4); //center
        dialog.dialogForm().form().design().top(220, 3); //center
    
    
        Items = dialog.addField(EnumStr(ABC));//,toDate);
        combousers = Items.control();
        combousers.enumType(0);
        combousers.label("Seleccione Usuario");
        
        while select userinfo
            numitems  ;
        
        combousers.items(numitems);
        numitems = 0;
        
        while select userinfo
        {
            numitems  ;
            combousers.item(numitems);
            combousers.text(userinfo.id);
            usercont  = userinfo.id;
        }
        
        dialog.run();
    
        if (dialog.closedOk()) // && field1.value() != "")
        {            
            userid = conpeek(usercont,Items.value()   1);
            
            dialog = new Dialog("Borrar Datos de Uso");
            dialog.dialogForm().form().design().left(44, 4); //center
            dialog.dialogForm().form().design().top(220, 3); //center
            //dialog.addText("Seleccione un Elemento a Eliminar");
    
            Items = dialog.addField(EnumStr(ABC));//,toDate);
    
            comboelements = Items.control();
            comboelements.enumType(0);
            comboelements.label("Elemento");
            
            numitems = 0;
            
            while select syslastvalue group by syslastvalue.elementName where syslastvalue.userId == userid
                numitems  ;
            
            comboelements.items(numitems);
    
            numitems = 0;            
            
            while select syslastvalue group by syslastvalue.elementName where syslastvalue.userId == userid
            {
                numitems  ;
                comboelements.item(numitems);
                comboelements.text(syslastvalue.elementName);
                elementcont  = syslastvalue.elementName;
            }
            
            dialog.dialogForm().form().design().left(44, 4); //center
            dialog.dialogForm().form().design().top(220, 3); //center
            
            dialog.run();
    
    
            if (dialog.closedOk())
            {
                element = conpeek(elementcont,Items.value()   1);
    
                ttsBegin;
                
                while select forUpdate syslastvalue 
                where syslastvalue.userId == userid && syslastvalue.elementName == element
                { 
                    syslastvalue.delete();
                }
                
                ttsCommit;
                
                Box::info("Eliminado.");
            }
            else
            {
                Box::info("No se pudo eliminar.");
            }
        }
    }

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 231,305 Most Valuable Professional on at
    RE: Is possible clear use data of Particular Class?

    You can delete the record from SysLastValue table.

  • ismaelivan Profile Picture
    ismaelivan 572 on at
    RE: Is possible clear use data of Particular Class?

    Thanks Nikolaos, Will you have information about it that you can share with me?

    I try this without success

        xSession::removeAOC ();
        SysTreeNode::refreshAll ();
        SysFlushDictionary::doFlush ();
        SysFlushAOD::doFlush ();
        xSession::updateAOC ();
        
        And....
    
        #AOT ;
        TreeNode::findNode(#TablesPath).AOTrefresh();
        TreeNode::findNode(#TableMapsPath).AOTrefresh();
        TreeNode::findNode(#ViewsPath).AOTrefresh();
        TreeNode::findNode(#ExtendedDataTypesPath).AOTrefresh();
        TreeNode::findNode(#BaseEnumsPath).AOTrefresh();
        TreeNode::findNode(#LicenseCodesPath).AOTrefresh();
        TreeNode::findNode(#ConfigurationKeysPath).AOTrefresh();
        TreeNode::findNode(#SecurityKeysPath).AOTrefresh();
        TreeNode::findNode(#TableCollectionsPath).AOTrefresh();
        TreeNode::findNode(#PerspectivesPath).AOTrefresh();
        TreeNode::findNode(#MacrosPath).AOTrefresh();
        TreeNode::findNode(#ClassesPath).AOTrefresh();
        TreeNode::findNode(#ReportsPath).AOTrefresh();
        TreeNode::findNode(#ReportTemplatesPath).AOTrefresh();
        TreeNode::findNode(#SectionTemplatesPath).AOTrefresh();
        TreeNode::findNode(#QueriesPath).AOTrefresh();
        TreeNode::findNode(#JobsPath).AOTrefresh();
        Dictionary::aodFlush();
        Dictionary::dataFlush();
        flush UtilElements, UtilIdElements;

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Is possible clear use data of Particular Class?

    Yes, it's possible. You can delete usage data per class, form or report.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans