liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
30
31
32
33
34
35
36
37
<apex:page showHeader="false" controller="PBIAuthorizationController" action="{!init}" sidebar="false" lightningStylesheets="true">
    <script type="text/javascript">
        function init() {
            var ISUser = '{!ISUser}';
            var PBIId = '{!PBIId}';
            var userid = '{!userid}';
            var UserName = '{!UserName}';
            var str = '';
            if(!ISUser){
                return;
            }
            if(PBIId){
                str += '/'+PBIId;
            }else{
                // str += '/a3L/e?retURL=%2F'+userid +'&CF00N10000008qhIq_lkid='+ userid
                // + '&CF00N10000008qhIq='+ UserName +'&Name=*';
                // str += '/lightning/o/PBIAuthorization__c/new?&defaultFieldValues={User__c= '+ encodeURI(userid) + ',Name=*}';
                // str += '/lightning/o/PBIAuthorization__c/new?&defaultFieldValues={User__c= 00510000000fSYI + ,Name=*,}';
                str += '/lightning/o/PBIAuthorization__c/new?defaultFieldValues={'+
 
                'Opportunity_Division__c='+ '信息'+','+
                'User__c='+ userid  +','+
                'Name=*,'+
                '}';
            }
            console.log(ISUser);
            console.log(PBIId);
            console.log(userid);
            console.log(UserName);
            console.log(str);
            window.open(str,'_self');
        }
    </script>
    <body onload="init()">
        <apex:pageMessages />
    </body>
</apex:page>