• Yang Wang
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 2
    Replies
public with sharing class TestVFController {

    public String recordtype = '';
    public TestVFController(ApexPages.StandardController controller) {
    recordtype = ApexPages.currentPage().getParameters().get('RecordType');
        if(String.isEmpty(recordtype)) {
            Map<Id,Schema.RecordTypeInfo> recordTypeInfos = Opportunity.SObjectType.getDescribe().getRecordTypeInfosByID();
            if(recordTypeInfos.get('012280000011A6F').isAvailable()){
                recordtype = '012280000011A6F';
                system.debug('debug:TypeA');
            }
            if(recordTypeInfos.get('012280000011A6K').isAvailable()){
                recordtype = '012280000011A6K';
                system.debug('debug:TypeB');
            }
        }
        
    }

    public PageReference init(){
        String url = '';
        system.debug('debug:recordtype:' + recordtype);
        if(recordtype == '012280000011A6F') {
            url = '/006/e?nooverride=1&retURL=/006/o';
        } else if(recordtype == '012280000011A6K') {
            url = '/006/e?opp9=' + system.today().addDays(5).format() + '&nooverride=1&retURL=/006/o';
        }
        
        return new PageReference(url);
        
    }
}

 
Hi guys,
My lightning component does not work in a pre-release sandbox with LockerService enabled.
Are there anyone face the same issue. Could you please share your solution or advice on how to resolve this issue.

Many thanks
Regards,
Yang
Hi Guys

when I am cloning from UI by clicking "clone" standard button, Its returning :false. On the other hand if I am doing it from APEX its returning " True".

lead c = new lead(id='00Q9000000xfFHVEA2');
lead cd = c.clone();
system.debug(cd.isclone());

USER_DEBUG|[5]|DEBUG|true

Does anyone know how to identify a new reocrds was cloned from UI in apex.
 
Hi,

We have a vf page with vertical table headers.
It save perfectly to PDF, but the renderAs=pdf doesn't align them vertically.
Did anybody got this problem?
.vertical-heading p {
                 writing-mode: vertical-lr;
                -webkit-writing-mode: vertical-lr;
                -ms-writing-mode: vertical-lr;
                filter: flipH() flipV();
                margin: 0 auto;
            }

<table>
<thead>
<tr>
<th class="vertical-heading"><p>Demo</p></th>
</tr>
</thead>
</table>



Thanks,
Yishay
Hi Guys

when I am cloning from UI by clicking "clone" standard button, Its returning :false. On the other hand if I am doing it from APEX its returning " True".

lead c = new lead(id='00Q9000000xfFHVEA2');
lead cd = c.clone();
system.debug(cd.isclone());

USER_DEBUG|[5]|DEBUG|true

Does anyone know how to identify a new reocrds was cloned from UI in apex.
 
Hi,

We have a vf page with vertical table headers.
It save perfectly to PDF, but the renderAs=pdf doesn't align them vertically.
Did anybody got this problem?
.vertical-heading p {
                 writing-mode: vertical-lr;
                -webkit-writing-mode: vertical-lr;
                -ms-writing-mode: vertical-lr;
                filter: flipH() flipV();
                margin: 0 auto;
            }

<table>
<thead>
<tr>
<th class="vertical-heading"><p>Demo</p></th>
</tr>
</thead>
</table>



Thanks,
Yishay