binxie
2024-01-18 22bd41f13147fce1df6ff35b592720c9cb387de9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * @Description: 
 * @Author: [lijinhuan]
 * @Date: 2023-08-14 22:10:56
 * @LastEditors: [lijinhuan]
 * @LastEditTime: 2023-08-17 11:59:57
 */
({
    handleLoad: function (component, event, helper) {
        console.log('URF_Contract__c: ',event.getParams().recordUi.record.fields.URF_Contract__c.value);
        var rdn = event.getParams().recordUi.record.fields.RecordType_DeveloperName__c.value;
        // 追加限次跳转
        var urf = event.getParams().recordUi.record.fields.URF_Contract__c.value;
        console.log('location: ',window.location.origin);
        if(rdn == 'NewMaintenance_Quote'){
            if (urf == true) {
                // window.open("/apex/SelectAssetEstimateURF?id={!URLENCODE("+component.get('v.recordId')+")}", "_self")
                window.open(window.location.origin+"/lightning/n/lexSelectAssetEstimateURF#id="+component.get('v.recordId'), "_self");
            }else{
                // window.open("/apex/SelectAssetEstimateVM?id={!URLENCODE("+component.get('v.recordId')+")}", "_self");
                window.open(window.location.origin+"/lightning/n/lexSelectAssetEstimateVM#id="+component.get('v.recordId'), "_self");
            }
            
        }else{
            window.open("/apex/SelectAssetEstimate?id="+component.get('v.recordId'), "_self");
            // window.open("/lightning/n/lexSelectAssetEstimate#id="+component.get('v.recordId'), "_self");
        }
    }
})