Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          RetireABOAssetImplementation

          RetireABOAssetImplementation

          Change the provisioning status of the existing asset to Retired and creates a new asset with the Active provisioning status.

          Interface

          ABOAssetInterfaceABOAssetInterface

          Sample Code

          global with sharing class RetireABOAssetImplementation  implements GlobalInterfaces.ABOAssetInterface{
             global sObject createAsset(Map<String, Object> input) {
             return null;
          }
          global Map<String, Object> getAssetList(Map<String, Object> input) {
             Map<String, Object> outputMap = new Map<String, Object>();
             List<Asset> assetList;
             List<String> assetRefList = (List<String>)input.get('assetReferenceIdList');
             system.debug('assetReferenceIdList is :: '+assetRefList);
             if(assetRefList != null && assetRefList.size() > 0){
                assetList = [Select Name, ProvisioningStatus__c from Asset where AssetReferenceId__c IN: assetRefList];
                system.debug('Asset List is in RETIRE :: '+assetList);
                if(assetList != null && assetList.size() > 0)
                {
                   for(Asset a: assetList)
                   {
                      if(a.ProvisioningStatus__c == 'Active') //There should be only one asset in the Active Status
                      a.ProvisioningStatus__c = 'Retired';
                   }
                   update assetList;
                   outputMap.put('assetList', assetList);
                   }
                }
             return outputMap;
             }
          }

          Related Implementations

          DefaultABOAssetImplementationDefaultABOAssetImplementation

           
          Loading
          Salesforce Help | Article