US English (US)
ES Spanish

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Log in
English (US)
US English (US)
ES Spanish
  • Home
  • Install RIO Education

Important setup for newly cloned sandbox and test classes

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • About Us
    Who is RIO Education? Experience RIO in action Customer go-live events Our Partners Housekeeping
  • RIO Insights
    Careers
  • RIO Recipe
    Project Management & Governance Discovery Design & Prototype Build & Implementation UAT Deployment & Metadata RIO Recipe: Training
  • Install RIO Education
    Configuration Integration with RIO Extension Package Installer Products
  • Releases
    Release Notes
  • Support
    Support FAQs Feature Articles Deep Dive RIO Academy Updates for other products
+ More


This article outlines the important data to be set up for:

  • a new developer sandbox.
  • developing any customization that requires test classes.


New sandbox

When a new developer sandbox is cloned from production, it only contains the setup data like custom settings and custom metadata type. The required custom object data like Trigger Handler is not included.

In order to make RIO Education work in the new sandbox, you would need to execute the following script in the developer console:

rio_ed.REDU_PostInstallation pi = new rio_ed.REDU_PostInstallation();

//setup the RIO Education settings
upsert
 pi.initRIOEdSettings(rio_ed__RIO_Education_Settings__c.getOrgDefaults());        
//setup EDA Hierarchy settings
upsert
 pi.updateEDASettings();

// Get the TDTM tokens of the existing HEDA TDTM configs:        
List<hed.TDTM_Global_API.TdtmToken> allTokens = hed.TDTM_Global_API.getTdtmConfig();
// Create all HEDA trigger handlers:        
hed.TDTM_Global_API.setTdtmConfig(allTokens, 'hed');

//disable EDA trigger handlers that replaced by RIO Education
update pi.disableEDATriggerHandlers();
//create all RIO Education related trigger handlers  
pi.createAllTriggerHandlers(); 

//create a default resource type
rio_ed__Resource_Type__c rType = new rio_ed__Resource_Type__c();        
rType.Name = 'Location';        
insert rType;



Test class

In a test class with seeAllData=false, you would need to setup the RIO Education data in the @TestSetup method:

@TestSetup    
static void makeData(){        
        rio_ed.REDU_PostInstallation pi = new rio_ed.REDU_PostInstallation();

        //setup the RIO Education settings
        upsert pi.initRIOEdSettings(rio_ed__RIO_Education_Settings__c.getOrgDefaults());
        
//setup EDA Hierarchy settings
 
       upsert pi.updateEDASettings();

        // Get the TDTM tokens of the existing HEDA TDTM configs:                
        List<hed.TDTM_Global_API.TdtmToken> allTokens = hed.TDTM_Global_API.getTdtmConfig();
        // Create all HEDA trigger handlers:        
        hed.TDTM_Global_API.setTdtmConfig(allTokens, 'hed');

        //disable EDA trigger handlers that replaced by RIO Education
 
       update pi.disableEDATriggerHandlers();        
        //create all RIO Education related trigger handlers               
        pi.createAllTriggerHandlers();

        //create a default resource type        
        rio_ed__Resource_Type__c rType = new rio_ed__Resource_Type__c();                
        rType.Name = 'Location';                
        insert rType;    
}



what data to set up for new developer sandbox what data to set up for developing customization test class how to set up rio education in new developer sandbox cloned from production refresh sandbox

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Not using Communities? What metadata to deploy
  • Upgrading? Which metadata should be deployed
  • RIO Education Deployment Process
  • RIO Education Plans
RIO Education

RIO Education Inc, a WDCi Company. This information is proprietary, confidential and protected by copyright ©2023.

CONTACT

E:  getinfo@wdcigroup.net

  • Privacy
  • Terms of service

Definition by Author

0
0
Expand