• SMARTIE
  • 970 Points
  • Member since 

  • Chatter
    Feed
  • 34
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 130
    Replies
Hello,
I have a button that needs to be disabled.  Ideally after it has successfully created a record:
<button label="My Button" class="slds-button slds-button--brand" onclick="{!c.submit}">Submit Button</button>

Enable/show this div so that the child component is available
<div style="text-align:right;">
            <c:child parentId="{!v.id}"/>
        </div>

Thanks,
P
@isTest
public class TestVerifyDate {
    @isTest static void testOldDate(){
        Date dateTest = VerifyDate.CheckDates(date.today(), date.today().addDays(-1));
        System.assertEquals(date.newInstance(2016, 4, 30), dateTest);
    }
    
    @isTest static void testLessThan30Days(){
        Date dateTest = VerifyDate.CheckDates(date.today(), date.today().addDays(20));
        System.assertEquals(date.today().addDays(20), dateTest);
    }
    
    @isTest static void testMoreThan30Days(){
        Date dateTest = VerifyDate.CheckDates(date.today(), date.today().addDays(31));
        System.assertEquals(date.newInstance(2016, 4, 30), dateTest);
    }

}

 
I had a field (Allotment) Long TextArea Field in Bren Updates(Custom Object).
I need to display the data which was in Allotment in te Visualforce Page.
I have tried it using <apex:outputField>
But still i was not getting thhe data to display on Visualforce page.

My issue on my Visualforce page:

    <apex:pageBlockSectionItem >
                              

                        <apex:outputLabel value="Allotment Summary" for="AllSum" style="font-family:Ancillary Bold; font-size:15px" />
                      <!--  <apex:outputField value="{!brenup.Allotment__c}" id="a0Wp0000003JTYb" />  -->
                        <apex:outputText value="{!HTMLENCODE(brenup.Allotment__c)}" style="white-space:pre;" escape="false"/>
                      <!--  <apex:inputfield value="{!brenup.Allotment_Summary__c}" id="AllSum" html-disabled="true" /> -->
                      <!--  <apex:inputTextarea richtext="false" value="{!brenup.Allotment__c}"  id="AllSum" readonly="true" cols="150" rows="25"/> -->
                        
                    </apex:pageBlockSectionItem>   

Bold code data is using now and it was not even displaying my data on Visualforce page.

ere below is my issue.
User-added image 
Please help me that i need to display my data in Visualforce page of that field(Allotment(Long Textarea Field)).

Please provide a solution for thisss.

Thanks and Regards,
Azhar Khasim.
public class Acc_Dynamic 
{
   Public List<AccAll> acl{set;get;}
   Public Acc_Dynamic()
    {
      acl=new List<AccAll>();
        for(Integer i=0;i<10;i++)
        {
          Account acc=new Account();
          acl.add(new AccAll(acc,false));
        }        
    }
    public class AccAll
    {
        Public Account accs{set;get;}
        Public Boolean flag{set;get;}
        public AccAll(Account acs,Boolean flg)
        {
          accs=acs;
          flag=flg;
        }   
    }
}
I've a picklist with the values like the below, I want the number part to show, so for example, BA, I want my field to just show 10001:-

10001: BA
10002: Virgin

Any thoughts? My List is 3000, so cannnot use dependent/workflow rule!
Hi Everyone.

I'm new to lightning and trying to open a datatable in a modal(popup). I have a requirement where when i check a checkbox, then a modal should open where data will be displayed from a certain object. I cannot figure out how to achieve this. I'm only able the display the datatable on the same page as of checkbox, and not in the modal.

Kindly siggest a solution. Thank you in advance.
Is it possible to create a LWC that could be used in a global action layout? Or is there a better way to add display text to the layout?
Dear Team ,

Thank you for your kind support !!!

Please let me know life cycle of Sales cloud . Please explain it object wise means in which table first data will get inserted (Leads,Oppurtunity,Account,Contact) , explain this process step by step . 

If we mark status in Lead as Closed-Won do this data automatically goes to other standard objects ?

Please clarify my doubt.

Thanks & Regards
Sachin Bhalerao
I want to add a custom Highlights component to a Lightning Record Page. I have never created a Visualforce Page for adding to a Lightning canvas.
I may be way off the mark but gave it a go.
Any tips to get this working would be great!

<apex:page standardController="Opportunity">
    
    <apex:pageBlock title="Opportunity Summary">
        <apex:pageBlockTable value="{!Opportunity}" var="opp">
            <apex:column title="Customer(s)"/>
              <apex:column title="Guarantor(s)"/>
              <apex:column title="Lender"/>
              <apex:column title="Lender ID"/>
              <apex:column title="Broker"/>
              <apex:column title="Broker Code"/>
              <apex:column title="Loan Amount"/>
              <apex:column title="Close Date"/>
           </apex:pageBlockTable>
        <apex:pageBlockTable value="{!Opportunity}" var="opp1">
              <apex:column value="{!opp1.Applicant_1__c}"/>
              <apex:column title="Guarantor 1"/>
            <apex:column value="{!opp1.Lender__c}"/>
              <apex:column value="{!opp1.Account.Lender_ID__c}"/> <!-- Get customer field on Account object -->
              <apex:column value="{!opp1.User.FullName}"/> <!-- Get name of Opportunity Owner -->
              <apex:column value="{!opp1.User.AFG_Code__c}"/> <!-- Get custom field on User object -->
              <apex:column value="{!opp1.Amount}"/>
              <apex:column value="{!opp1.CloseDate}"/>
           </apex:pageBlockTable>
        <apex:pageBlockTable value="{!Opportunity}" var="opp2">
              <apex:column value="{!opp2.Applicant_2__c}"/>
              <apex:column title="Guarantor 2"/>
           </apex:pageBlockTable>
    </apex:pageBlock>
    
</apex:page>

Current Error Message: Invalid field USER for sObject Opportunity.
I am sure there are more errors.
I know the definition of these Id's;. But i dont know what is the use of these ids and why we use it..Even with the accountId we can relate objects the why use these.Whoid is equivalent to Contact's ID or Lead Id then why we dont use those id's instead of who id or what id
Hello guys,

Need help in these for writing a validation rule

When field: 'Candidate Final Status" is not blank, then field: "Interviewer" and field: "Comments" is mandatory Validation Rule

Please help me from thiss...

Regards,
Azar Khasim

 
Hello,



User-added image

I wan to filter by date of current year, how can i do it ?
I can filter by date but do i have option to filter by YEar()

thank you in advance 
Example select id from account where id iN:accList 
({
navigate : function(component, event, helper) {
        var navigateEvent = $A.get("e.force:navigateToComponent");
        navigateEvent.setParams({
            componentDef: "c:RegistrationFormTutorial"
        });
        navigateEvent.fire();
    }
})

I want to navigate from one lightning component to another component (RegistrationFormTutorial). I have written the above code. But I am getting error like this:


" This page has an error. You might just need to refresh it. Action failed: c:HtmlTryout$controller$navigate [Cannot read property 'setParams' of undefined] Failing descriptor: {c:HtmlTryout$controller$navigate} "

Could anyone please help me on this. Thanks in advance.
Hi all,
I generate the code for displaying the records of object choosen in picklist field (Lead and Contact)
Actually i want to add Previous and Next buttons after dipalying the records..
Example if have 50 records first it will displayed only 10 records for next records we should have Next Or previous buttons...........
Here is my code...
Apex class :
public class objectcontroller
{
    public List<selectOption> objects{get; set;}
    public string selected{get; set;}
    public List<contact> obj1{get; set;}
    public list<lead> obj2{get; set;}
    public boolean obj1Status{get; set;}
    public boolean obj2Status{get; set;}
    public list<wrapcontact> wrapcon{get;set;}
    public list<wrapLead> wrapLd{get;set;}
    public objectcontroller()
    {
        obj1Status=false;
        obj2Status=false;
        objects= new List<selectOption>();
        objects.add(new selectOption('contact','contact'));
        objects.add(new selectOption('lead','lead'));
        wrapcon = new List<wrapcontact>();
        wrapLd = new list<wrapLead>();
    }
    public pageReference getRecordofObject()
    {
         if(selected=='contact')
        {
            for(contact c :[select id,lastname,Email from contact limit 100]){
            wrapcon.add(new wrapcontact(c));
            }
            obj1Status=true;
            obj2status=false;
        }   
        else
        {
            for(lead l:[select name,company,Status from lead limit 100]){
                wrapLd.add(new wrapLead(l));
            }
            obj1status=false;
            obj2Status=true;
        }
        return null;
    }
    public class wrapcontact {
        public contact con {get; set;}
        public Boolean selected {get; set;}
 
        public wrapcontact(contact a) {
            con = a;
            selected = false;
        }
    }
    public class wraplead{
        public lead Ld {get; set;}
        public Boolean selected {get; set;}
 
        public wraplead(lead a) {
            Ld = a;
            selected = false;
        }
    }
    
}
Visulaforce page :
<apex:page controller="objectcontroller" showHeader="false">
    <apex:form >
        <apex:pageBlock title="Select a object">
            <apex:selectList value="{!selected}" size="1">
                <apex:selectOptions value="{!objects}"/>
            </apex:selectList>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!getRecordofObject}" value="Show Records" rerender="cb"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:outputPanel >
            <apex:pageBlock id="cb">
                <apex:pageBlockSection >
                    <apex:pageBlockTable value="{!wrapcon}" var="ob1" rendered="{!obj1Status}">
                        <apex:column >
                            <apex:inputCheckbox value="{!ob1.selected}" id="inputId"/>
                        </apex:column>
                        <apex:column value="{!ob1.con.id}"/>
                        <apex:column value="{!ob1.con.lastname}"/>
                        <apex:column value="{!ob1.con.Email}"/>
                    </apex:pageBlockTable>
                </apex:pageBlockSection>  
                <apex:pageBlockSection >
                    <apex:pageBlockTable value="{!wrapLd}" var="ob2" rendered="{!obj2Status}">
                        <apex:column >
                            <apex:inputCheckbox value="{!ob2.selected}" id="inputId"/>
                        </apex:column>
                        <apex:column value="{!ob2.Ld.id}"/>
                        <apex:column value="{!ob2.Ld.company}"/>
                        <apex:column value="{!ob2.Ld.status}"/>
                    </apex:pageBlockTable>
                </apex:pageBlockSection>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>

Thanks in advance.......
Hello Aloha,
I want to use Visual Studio Code to manage my code. I already installed the necessary extensions and I created my project locally then pushed some apex classes.

Today, I want to reconnect with this organization and open the project locally.

To do so, I do Ctrl + Shift + P to enter my cli commands such as:

sfdx force: org: list --all
sfdx force: auth: logout -u <hub alias>
sfdx force: org: open
....

But my orders are not recognized. Only these are offered to me:
User-added image
How do I use the keyboard shortcut Ctrl + Shift + P to reconnect to my organization and open the project file tree locally, please?
Hi All,
How to add select check box after displaying Lead and Contact records in visualforce page.
I have written the apex class and visual force page for displaying records both leads and contacts here is my code..........
apex class:
public class objectcontroller
{
    public List<selectOption> objects{get; set;}
    public string selected{get; set;}
    public List<contact> obj1{get; set;}
    public list<lead> obj2{get; set;}
    public boolean obj1Status{get; set;}
    public boolean obj2Status{get; set;}
    public objectcontroller()
    {
        obj1Status=false;
        obj2Status=false;
        objects= new List<selectOption>();
        objects.add(new selectOption('contact','contact'));
        objects.add(new selectOption('lead','lead'));
    }
    public pageReference getRecordofObject()
    {
         if(selected=='contact')
        {
            obj1=[select id,lastname,Email from contact limit 100];
            obj1Status=true;
        }   
        else
        {
            obj2=[select name,company,Status from lead limit 100];
            obj2Status=true;
        }
        return null;
    }
    
}

Visualforce page:
<apex:page controller="objectcontroller" showHeader="false">
    
    <apex:form >
        
        <apex:pageBlock title="Select a object">
            <apex:selectList value="{!selected}" size="1">
                <apex:selectOptions value="{!objects}"/>
            </apex:selectList>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!getRecordofObject}" value="Show Records" rerender="cb"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:outputPanel >
            <apex:pageBlock id="cb">
                <apex:pageBlockSection >
                    <apex:pageBlockTable value="{!obj1}" var="ob1" rendered="{!obj1Status}">
                        <apex:column value="{!ob1.id}"/>
                        <apex:column value="{!ob1.lastname}"/>
                        <apex:column value="{!ob1.Email}"/>
                    </apex:pageBlockTable>
                </apex:pageBlockSection>  
                <apex:pageBlockSection >
                    <apex:pageBlockTable value="{!obj2}" var="ob2" rendered="{!obj2Status}">
                        <apex:column value="{!ob2.id}"/>
                        <apex:column value="{!ob2.company}"/>
                        <apex:column value="{!ob2.status}"/>
                    </apex:pageBlockTable>
                </apex:pageBlockSection>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>
Dear Team ,

Greetings !!!

Team i want to ask if i want to insert data using Lightning Data table in lightning component is it possible ? I am able to perform inline edit using lightning data table . If i pass data to apex class in insert menthod is it possible that data get saved . M facing error .

Thanks & Regards
Sachin Bhalerao

 
Dear Team ,

In my Personnal info section security token link is missing . How can i search my security token .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

I have created SOAP class plz . plz look at below code :

global class accSOAPint {

    webservice static Account dopost(String Name){
        Account acc = new Account();
        acc.Name = Name;
        insert acc;
        return acc;
        
    }
}

Now i have to test this method on Workbench . Plz share the code that we have write in body section .

Thanks & Regards
Sachin Bhalerao
Hi Guys,

Please help me. I am facing below error for my code

Error:

Line: 4, Column: 5 Invalid constructor syntax, name=value pairs can only be used for SObjects: Contact  OK

Code:


//Create a new contact

List<Contact> conList = new List<Contact> {
    new Contact(FirstName='Nagraj',LastName='B',Department='Finance'),
    new Contact(FirstName='Deepak',LastName='Shivalingappa',Department='Design'),
    new Contact(FirstName='Sachin',LastName='Gotal',Department='PIM'),
    new Contact(FirstName='Rachithra',LastName='R',Department='Automation')     
};
    
// Bulk insert all contacts with one DML call
    
    insert conList;

// List to hold the new contacts to update

List<Contact> listToUpdate = new List<Contact>();

// Iterate through the list and add a title only
//   if the department is Finance

for(Contact con : conList){
    if(con.Department == 'Finance'){
        con.Title = 'Financial Advisor';
        // Add updated contact sObject to the list.
        listToUpdate.add(con);
    }
}    
// Bulk update all contacts with one DML call
update listToUpdate;
 
HI All,

we have a requirement where we want to prevent users from deleting emailmessages of email related list under cases.

is there a way where we can control through CURD permissions or any other solution would help here.

Thank you

Regards
Sainath.
app created in classic is not available in lightning experience why ?
Hi All, 

I have a requirement to send out 50000 email to a un-verified email address every day, but due to 5000 email limit, we cannot. 

Do you have any solution which can be implemented?

Background: 
We are using a custom VF page to filter out records which need to send an email. 

An ideal solution would be a button over the VF page which can send email just like Salesforce button using some tool. 


Thanks in Advance. 
Hi Everyone,

I need to know that in how many ways i can create a task popup window reminder notofications for follow up time.If anyone have idea please share with me and if possible please explain me as well.

Thanks for ur help.

thanks inadvance,
P.Balu 
Can someone please explain how will the application event propagation take place when the components are not related to each other ? 

Application markup :

    <aura:application>
        <c:aeNotifier/> // fires the event 
        <c:aeHandler/> // handles the event
        <c:aeHandlerTwo/> // handles the event   
    </aura:component>

`Please how the event propagation would take place in case of capture,bubble and default phase ?


Thanks in Advance !
I want my each record to have a unique ID 
i.e In format:- ABC001
Can I assign each object of Account, Lead, Opportunity a unique id ?
  • December 05, 2019
  • Like
  • 0
i am trying to pass the data-id and data-value to javascript .but i am anuable to pass those values onchange event .please help me how to pass the values onchange event
<aura:iteration items="{!tableList}" var="set" indexVar="childindex">
                                <tr>
                                    <td>
                                        <ui:outputtext class="slds-align_absolute-center" value="{!childindex + 1}"> </ui:outputtext>
                                    </td>
                                    
                                    <td>
                                        <!--lightning:input variant="label-hidden" class="slds-align_absolute-center" disabled="true" name="Name" type="text"    value="{!set.field}" /-->
                                        <a style="color:black"   >
                                            <!--lightning:combobox aura:id="select_Field" name="FieldReference" label="FieldReference" placeholder="Choose any Field" variant="label-hidden" value="{!set.field}" options="{! v.headerOptions }" /-->
                                            <lightning:select   class="label-hidden" value="{!set.field}" data-id="{!masterindex}" data-value="{!childindex}" onchange="{!c.onHeaderChange}" >
                                                 <option text="Select any value" value=""/>
                                                <aura:iteration items="{!v.headerOptions}" var="Option">
                                                    <option text="{!Option.label}" value="{!Option.value}"/>
                                                </aura:iteration>
                                            </lightning:select>
                                            
                                        </a>
                                    </td>
 
Hello,
I have a button that needs to be disabled.  Ideally after it has successfully created a record:
<button label="My Button" class="slds-button slds-button--brand" onclick="{!c.submit}">Submit Button</button>

Enable/show this div so that the child component is available
<div style="text-align:right;">
            <c:child parentId="{!v.id}"/>
        </div>

Thanks,
P
Hi gays
I have apex class
public class inputIntegerCtrl {
     public Integer intValue { get; set; }
     ......
}
and visual page
<apex:page controller="inputIntegerCtrl">
   <apex:inputText label="value" value="{!intValue}" />
...
</apex:page>

When I try to set "null" (empty) in apex:inputText, I get value "0" instead of "null". How set "null" value ?
 
Hi,
I am learning lightning, can some1 pls help me.

I have created 2 components 1 is parent and the other is child and i am using child component in application so that it wud call parent indirectly.And if i call my parentcomponent in application its throwing me an error saying "It cant be instantiated". 

<--c:parentinherit-->
<aura:component extensible="true">
    <h3>Hi i am parent comp</h3>
</aura:component>

<--c:childinherit-->
<aura:component  extends="c:parentinherit">
    <h1> I am from child</h1>
</aura:component>


In my application i am using child component.I am not getting child component header tag output. Can any1 help?

<aura:application >
    
    Hi i am from application
    <c:childinherit/>
</aura:application>







 
  • December 04, 2019
  • Like
  • 0
Can anyone help me fix the code I am getting the below error

search term must be longer than one character: s
Error is in expression '{!runQuery}' in component <apex:commandButton> in page productsearchpopupcontroller: Class.ProductSearchPopupController.runQuery: line 63, column 1
An unexpected error has occurred. Your development organization has been notified.

global class ProductSearchPopupController {
   
    public String query {get; set;}
    public List<PricebookEntry__c> products {get; set;}
    public List<wrapProduct> wrapProductList {get; set;}
    public List<PricebookEntry__c> selectedProduct{get;set;}
    public List<QuoteLineitem__c> quoteLineList{get;set;}
    public List<wrapProduct> selectedWrapperList{get;set;}
    public Boolean normalList{get;set;}
    public Boolean selectedList{get;set;}
    public Boolean block{get;set;}
    public Boolean block1{get;set;}
    public Boolean block2{get;set;}
    public String SalesPrice {get; set;}
    public integer Discount {get; set;}
    public String Quantity {get; set;}
    public String ServiceDate {get; set;}
    Id recordId;
   
    public ProductSearchPopupController(ApexPages.StandardController controller){
        recordId = controller.getId();
        SalesPrice='';
        Discount=0;
        Quantity='';
        ServiceDate='';
        system.debug('recordId '+recordId);
        wrapProductList = new List<wrapProduct>();
        selectedWrapperList = new List<wrapProduct>();
        normalList = true;
        selectedList = false;
        block = true;
        block1 = false;
        block2 = false;
        
    }
   
     public PageReference runQuery1(){
         
        List<PricebookEntry__c> searchResults=[select id, Name, ProductCode__c, Product2Id__r.Product_Description__c,UnitPrice__c, UseStandardPrice__c from PricebookEntry__c];
        if(searchResults.size() >= 0){
            
            for(PricebookEntry__c a: searchResults) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapProductList.add(new wrapProduct(a));
                block = true;
                block1 = true;
                block2 = false;
            }
        }
        return null;
    }
    
    public PageReference runQuery(){
        wrapProductList = new List<wrapProduct>();
        if(query == null || query == ''){
            system.debug('query '+query);
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Info,'Please enter Product to search for'));
               runQuery1();
           
        }

        system.debug('query '+query);
        List<List<PricebookEntry__c>> searchResults=[FIND :query IN ALL FIELDS RETURNING PricebookEntry__c (id, Name, ProductCode__c, Product2Id__r.Product_Description__c,UnitPrice__c, UseStandardPrice__c)];
        if(searchResults[0]!=null){
            for(PricebookEntry__c a: searchResults[0]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapProductList.add(new wrapProduct(a));
                block = true;
                block1 = true;  

                block2 = false;

            }
        }
        return null;
    }
    public PageReference ProceedWithSelectedToNextPage(){
        selectedWrapperList = new List<wrapProduct>();
        normalList = false;
        selectedList = true;
        for(wrapProduct selectedWrapObj: wrapProductList){
            system.debug('selectedWrapObj.selected  ---------'+selectedWrapObj.selected);
            if(selectedWrapObj.selected == true)
                selectedWrapperList.add(selectedWrapObj);
        }
        system.debug('selectedWrapperList size ---------'+selectedWrapperList.size());
        PageReference pageRef = new PageReference('/apex/AccountOpportunityTwoPage');
        pageRef.setRedirect(false);
        return pageRef;
    }
    public void processSelected() {
        selectedProduct = new List<PricebookEntry__c>();
        for(wrapProduct wrapProductObj : wrapProductList) {
            if(wrapProductObj.selected == true) {
                selectedProduct.add(wrapProductObj.acc);
                block = false;
                block1 = false;
                block2 = true;
               
            }
        }
    }
   
    public void GoBack() {
        block = true;
        block1 = true;
        block2 = false;
    }
   
    global class wrapProduct{
        public PricebookEntry__c acc {get;set;}
        public Boolean selected {get;set;}
        public wrapProduct(PricebookEntry__c p) {
            this.acc = p;
            this.selected = false;
        }
       
    }
   
    public pagereference saveproduct(){
        List<QuoteLineitem__c> quoteLineList = new  List<QuoteLineitem__c>();
         if(Test.isRunningTest()){
            insertTestData();
        }
        if(!selectedProduct.isEmpty()){
            for(PricebookEntry__c sp:selectedProduct){
                system.debug('sp '+sp);
                QuoteLineitem__c qli = new QuoteLineitem__c();
                qli.QuotesId__c = recordId;
                qli.ListPrice__c = sp.UnitPrice__c;
                qli.UnitPrice__c = sp.UnitPrice__c;
                qli.Product2Id__c = sp.Product2Id__c;    
                if(Discount!=0 || Discount!=null){
                    qli.Discount__c = Discount;
                }
                if(Quantity!=null){
                    qli.Quantity__c = Decimal.valueof(Quantity);
                }
                quoteLineList.add(qli);
            }
            
           
            if(quoteLineList.size() > 0){
                insert quoteLineList;
                PageReference pageRef = new PageReference('https://proseraa.lightning.force.com/lightning/r/Quotes__c/'+recordId+'/view');
                pageRef.setRedirect(true);
                return pageRef;
            }
        }
        return null;
    }
    public void insertTestData(){
        Product2__c testProduct = new Product2__c();
            testProduct.Name='Test product';
            insert testProduct;
            PricebookEntry__c testpbe = new PricebookEntry__c();
                testpbe.Name='Test PriceBookEntry';
                testpbe.UnitPrice__c =123;
                testpbe.Product2Id__c=testProduct.Id;
                insert testpbe;
            selectedProduct.add(testpbe);
    }
    
}
How to login to basic login.salesforce.com after deploying my subdomain, I don't remember if I unchecked "Prevent login from login.salesforce.com" while deploying my subdomain. I am doing this from DE account?
@isTest
public class TestVerifyDate {
    @isTest static void testOldDate(){
        Date dateTest = VerifyDate.CheckDates(date.today(), date.today().addDays(-1));
        System.assertEquals(date.newInstance(2016, 4, 30), dateTest);
    }
    
    @isTest static void testLessThan30Days(){
        Date dateTest = VerifyDate.CheckDates(date.today(), date.today().addDays(20));
        System.assertEquals(date.today().addDays(20), dateTest);
    }
    
    @isTest static void testMoreThan30Days(){
        Date dateTest = VerifyDate.CheckDates(date.today(), date.today().addDays(31));
        System.assertEquals(date.newInstance(2016, 4, 30), dateTest);
    }

}