黄千龙
2023-03-08 962519811b7c4be07f30d09e791798b0ea79d3ae
force-app/main/default/classes/AssetHandler.cls
@@ -5,6 +5,7 @@
    private Map<Id, Asset> oldMap;
    private List<Asset> newList;
    private List<Asset> oldList;
    private static final Map<String,Schema.RecordTypeInfo>  DEVELOPERNAMEMAP  = Schema.SObjectType.Asset.getRecordTypeInfosByDeveloperName();// 20230306 ljh add
    @TestVisible private static Set<String> testTargetDepts;
    @TestVisible private static Id Account_Asset_Id;
     public static Boolean disabled = false;
@@ -109,7 +110,11 @@
        StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;
        Set<id> AssetIDSet = new Set<id>();
        for(Asset tempAsset : newList){
            if(String.isNotBlank(tempAsset.warrantyType__c)){
            // 20230306 ljh update start
            Id Shipment = DEVELOPERNAMEMAP.get('Shipment').getRecordTypeId();
            // if(String.isNotBlank(tempAsset.warrantyType__c)){
            if(String.isNotBlank(tempAsset.warrantyType__c) && Shipment != tempAsset.RecordTypeId){
            // 20230306 ljh update end
                AssetIDSet.add(tempAsset.id);
            }
        }