• Jerry7
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hello everyone,

I am seeking to know about is there any way to skip client's validations rules by programatically ..?

Thanks in advance..!
Hello Guys  I am facing the issue  last  few days let me know if anyone have good idea about this issue. I also got the 100% code coeverage of the class but the method is going fail with Methods defined as TestMethod do not support Web service callouts in Test class..Error
global with Sharing class WebserviceCreateCME {
    
    
    webservice static Void CreateCME(Id ContractId)
    {
      
        CreateCasesByContract.CreateCase();
        
    }
    
    
}
Test Class 
@isTest
Public with Sharing class TestWebserviceCreateCME {
    @IsTest Static void WebserviceTestMethod()
        
    {  
            
        Id retailRecordTypeId = [ SELECT Id,Name FROM RecordType WHERE name='Retail Contract' AND SObjectType='Contract' limit 1].Id;
        
        NAICS_Code__c nacObj = new NAICS_Code__c(
            name = 'nac code01');
        
        insert nacObj;
        
        Leasing_Agent__c l = new Leasing_Agent__c(
            name = 'Name',
            EmployeeID__c = 12,
            InActiveDate__c = date.today(),
            IS_ACTIVE__c = true,
            LeasingAgentID__c = 14
        );
        
        insert l;
        
        BP_Property__c bp_property = new BP_Property__c(
            name = 'BP_Property__c',
            AvailableArea__c = 22402,
            AvailableCount__c = 28,
            BD_Owner_Entity_ID__c = 45,
            BD_Property_ID__c = 32,
            Building_Count__c = 1,
            Colloquial_Owner__c = 'David Haug',
            InActiveDate__c = date.today(),
            IS_ACTIVE__c = true,
            Leasing_Agent__c = l.id,
            Lender__c = 'lender',            
            Market_Name__c =  'market name',
            Occupancy__c = 46,
            Owner_Entity__c = 'owner entity',
            Pay_To_Name__c = 'pay to name',
            Payment_Address__c = 'payment address',
            Payment_City__c = 'payment city',
            Payment_State__c = 'payment state',
            Payment_Suite__c = 'suite',
            Payment_Zip__c = '12323',
            PropChargeCAM__c = 47,
            PropChargeElectric__c = 1234,
            PropChargeNNN__c = 48,
            PropCurrentYearExpenses__c = 49,
            Property_Fax__c = '1231231234',
            Property_City__c = 'property city',
            Property_Code__c = 'property code',
            Property_ID__c = 49,
            Property_Manager__c = 'manager',
            Property_Name__c = 'property name',
            Property_SQFT__c = 49,
            Property_State__c = 'property state',
            Property_Street__c = 'property street',
            Property_Zip__c = '12312',
            PropGrossArea_c__c = 1234
        );
        
        insert bp_property;
        
        Building__c building = new Building__c(
            name = 'building name',
            PropertyIDYardi__c = 1227,
            PropertyIDBD__c = 23,
            PropertyCode__c = 'm2323dh',
            BuildingIDBD__c = 33,
            Building_State__c = 'building state',
            BuildingStreet__c = 'building street',
            BuildingZip__c = '12312',
            Building_City__c = 'building city',
            IS_ACTIVE__c = true,
            BDBuildingName__c = '2323 South Voss Rd',
            Google_Review_URL__c = 'http://www.google.com',
            Yelp_Review_URL__c = 'http://www.yelp.com',
            InActiveDate__c = date.today(),
            BldgGrossArea__c = 40,
            BP_Property__c = bp_property.id
        );
        
        insert building;
        
        BP_Unit__c bp_unit = new BP_Unit__c(
            name = 'bp unit name',
            BD_Availability_Status__c = 'status',
            BD_BuildingID__c = 50,
            BD_PropertyID__c = 51,
            BD_UnitID__c = 52,
            BD_UnitNum__c = '53',
            BP_Property__c = bp_property.id,
            Building__c = building.id,
            InActiveDate__c = date.today(),
            IS_ACTIVE__c = true,
            SF_Unit_Status__c = 'status',
            Size__c = 54,
            Type__c = 'type',
            Unit_Rate__c = 55,
            Unit_Recommended_Rent__c = 56,
            Unit_Sub_Category__c = 'sub category',
            Yardi_Unit_ID__c = 57,
            Yardi_Unit_Num__c = 'unit num');
        
        insert bp_unit;
        
        Account account = new Account(
            name = 'account name',
            type = 'owner',
            NAICS_Code__c = nacObj.Id,
            NAICS_Code_4__c = 'Accounting, Tax Preparation, Bookkeeping, and Payroll Services | 5412',
            Industry = 'Energy');
        
        insert account;
        
        Contact contact = new Contact(
            lastname = 'nguyen',
            accountid = account.id);
        
        insert contact;     
        
        Contact contractContact = new Contact(
            lastname = 'test',
            MailingStreet  = 'MailingStreet',
            MailingCity = 'MailingCity',
            MailingState = 'MailingState',
            MailingPostalCode = 'MailingPostalCode',
            
            accountid = account.id);
        
        insert contractContact; 
        
        Account brokeraccount = new Account(
            name = 'broker account',
            type = 'owner');
        
        insert brokeraccount;
        
        Opportunity Oppt = new Opportunity(
            Name='test opportunity', 
            Status__c = 'Actively Looking',            
            StageName='Initial Inquiry', 
            CloseDate= system.today(),
            Leasing_Agent__c = l.id,
            AccountID = account.id,
            LeadSource = 'Test Lead Source',
            Commencement_Date__c = Date.today(),
            Lease_Expiration_Date__c = Date.today(),
            Lease_Signed_Date__c = Date.today(),
            Lease_Square_Feet__c = 12345,
            Suite__c = 'Test Suite',
            Preferred_size__c = '100-500');
        
        Insert Oppt;
        
        Contract c = new Contract(
            Absorbed_Explanation__c = 'explanation',
            Additional_Monthly_Charge_Notes__c = 'notes',
            After_hour_Utilities_Detail__c = 'utility details',
            After_hour_Utilities__c = 'yes',
            ATTN__c = 'attn',
            Breakpoint__c = 6,
            Broker_Comm_Paid__c = 7,
            Brokerage_services_info_given__c = 'info given',
            Broker__c = contact.Id,
            Broker_involved__c = 'Yes',
            CAM__c = 8,
            Rent_Commencement_Date__c = date.today(),
            Comments__c = 'comments',
            Net_TI__c = 9,
            ETIC__c = 10,
            Other_Expenses__c = 11,
            Space_Leased__c = '12',
            Tenant_Prepaid__c = 13,
            TI_Applied_To__c = 'Free Rent',
            TI_Credit__c = 14,
            Other_Description__c = 'other description', 
            Contact_Email__c = 'minh@email.com',
            Base_Mo_Yr__c = date.today(),
            CPI_Cap__c = 15,
            Deposit_Transfer_Amount__c = 16,
            Elec__c = 17,
            Elec_Options__c = 'elec options',
            Escalation_Cap__c = 3,
            X1st_Mth_Rent_Received__c = 'first month rent recieved',     
            Guarantor__c = contact.id,
            Holdover_Lease_Backdated__c = 'holdover lease backdated',
            Holdover_Not_Std__c = 17,
            How_Long__c = date.today(),
            Initial_Agreement_Start_Date__c = date.today(),
            Insurance__c = 18,
            Lease_Agreement__c = 'lease agreement',
            Lease_Type__c = 'lease type',
            Lease_Type_Comments__c = 'lease comments',
            MLS_Comment__c = 'mls comment',
            MLS_Type__c = 'Lease',
            Non_Standard_Fee_Desc__c = 'non std fee desc',
            Non_Std_Fee__c = '24',
            OPEX_Base__c = date.today(),
            OPEX_Stop__c = 25,
            Other_Monthly_Charge__c = 26,
            Other_Monthly_Charge_Desc__c = 'monthly charge desc',
            Other_Provisions__c = 'other provisions',
            Parking__c = 27,
            PT_Other_Desc__c = 'pt other desc',
            PT_Type__c = 'type',
            Payment_not_in_full_details__c = 'payment not in full details',
            Payment_Type__c = 'payment type',
            Percent_Rent__c = 28,
            Prior_Annual_Rate__c = 29,
            Pro_Rata_Share__c = 30,
            Promo_Mktg__c = 31,
            Renewal_Option_Detail__c = 'renewal option detail',
            Renewal_Option__c = 'renewal option',
            Rent_Adjustment__c = 'rent adjustment',
            Reserved_Parking_Detail__c = 'reserved parking detail',
            Reserved_Parking__c = 'reserved parking', 
            Right_of_First_Refusal_Detail__c = 'refusal detail',
            Right_of_First_Refusal__c = 'first refusal', 
            Security_Deposit__c = 32,
            Security_Deposit_Received__c = '33',
            Signage__c = 34,
            Special_Provisions__c = 'special provisions',
            Storage__c = 76,
            Taxes__c = 35,
            Tenant_From__c = 'tenant from',
            Term_Type__c = 'term type',
            Termination_Option_Date__c = date.today(),
            Termination_Option_Detail__c = 'termination option detail',
            Termination_Option__c = 'termination option',         
            Unit_Num_On_Lease__c = 'a02',
            USA_Patriot_Act__c = 'usa patriot act',        
            Prorated_rent_due__c = 37,
            What_Happened__c = 'what happened',
            Late_Fee_Pct__c = 38,
            Rent_Due_Date__c = 'rent due date',
            Hold_Over_Percentage__c = 39,
            //MLS_TRAN_ID__c,
            deactivation_reason__c = 'deactivation reason',
            deactivation_date__c = date.today(),
            CME_Case_ID__c = 40,
            accountid = account.id,
            Building__c = building.id,
            BP_Unit__c = bp_unit.id,
            Manual_Contract_End_Date__c = system.today(),
            Status = 'Lease Signed By Tenant',
            Contract_Contact__c = contractContact.Id,
            CustomerSignedDate = system.today(),            
            Opportunity__c = oppt.id,
            RecordTypeID = retailRecordTypeId
        );
        
        
        insert c;
        
        
        WebserviceCreateCME.CreateCME(c.Id);
    }
}




  • April 07, 2017
  • Like
  • 0
Hello guys I am trying to get the code coverage of the apex callout in rest API. Method is getting failed and I am able to achieve only 40% code coverage of the class. Please give your valuable suggestions. Thanks in advance..!


Apex Class
global with sharing class CreateCasesByContract 
{

    global static string GetToken(string userName, string password)
    {   
        string accessToken;
        Http client = new Http();
        HttpRequest req = new HttpRequest();
        req.setEndpoint('-------------------');
        req.setMethod('POST');
        string encodedBody = EncodingUtil.urlEncode('grant_type','UTF-8')+'='+EncodingUtil.urlEncode('password','UTF-8')+'&'+EncodingUtil.urlEncode('username','UTF-8')+'='+EncodingUtil.urlEncode(userName, 'UTF-8')+'&'+EncodingUtil.urlEncode('password','UTF-8')+'='+EncodingUtil.urlEncode(password, 'UTF-8');
        req.setHeader('content-type', 'application/x-www-form-urlencoded');
        req.setBody(encodedBody);
        HttpResponse res = client.send(req);
        String Token = res.getBody(); 
        system.debug('J!GS' + Token );

        JSONParser parser = JSON.createParser(Token);
        While(parser.nextToken() != null)
        {
            if ((parser.getCurrentToken() == JSONToken.FIELD_NAME)) 
            {
                String fieldName = parser.getText();
                parser.nextToken();
                if(fieldName == 'access_token')
                {
                    accessToken = parser.getText();      
                } 
            }
        }

        return accessToken;
    } 


    global  Integer CreateCase()
    {
    Integer C;
        //Make POST call for getting AssocType object 
        string assocData;
        String access_token = GetToken('API_Admin','Boxer@123');

        Http client = new Http();
        HttpRequest req = new HttpRequest();
        req.setEndpoint('------------------'+ System.UserInfo.getName() +'&caseType= 82');
        req.setMethod('GET');      
        req.setHeader('content-type', 'application/json');
        req.setHeader('Authorization', 'bearer ' + access_token);
        HttpResponse res = client.send(req);
        String assocString = res.getBody();      
        ApiResponse APIRes = new ApiResponse();

        APIRes = (ApiResponse) System.JSON.deserialize(assocString, ApiResponse.class);

        system.debug('ApiRes object '+ APIRes);
        string CID2;

        List<Contract>  ConList = [Select id,Property_Manager__c,DueDate__c,Region__c,PROPERTY_CODE__c, BP_Property__r.Name,bp_property_id__c,Region_ID__c,
                                   LeasingAgentSAM__c ,BP_Unit__r.Name from Contract where  Id =: cid and Broker_Involved__c = 'Yes'  ORDER BY LastModifiedDate  DESC  limit 1];

        List<textValuescls> txstring = New List<textValuescls>();

        string metadataValue = '';

        String CurrentUserofSFstr = UserInfo.getName();

        CaseData cd = New CaseData();


        //Mapping the Contarct data With AssocDataTypes and Passing parameters.

        ****for(AssocType AC: APIRes.ResponseContent)
        {
            for(Contract  C1 : ConList)
            {   
                CID2 = C1.Id;
                string CaseTitelstr = C1.PROPERTY_CODE__c  + '  X  '+  C1.BP_Unit__r.Name   +    'Broker Commission Request';
                if(AC.Description == 'Property')
                {
                    metadataValue += AC.AssocTypeID + ',0,' + C1.bp_property_id__c +  ',' + AC.Description + ',' + C1.BP_Property__r.Name +'|';
                }
                else if(AC.Description == 'Region')
                {
                    metadataValue += AC.AssocTypeID + ',0,' + C1.Region_ID__c + ',' + AC.Description +',' + C1.Region__c + '|';
                }
                else if(AC.Description == 'Status')
                {   
                    metadataValue += AC.AssocTypeID + ',3784,0,Status,New ';
                }
                else if(Ac.Description == 'Suite')
                {   
                    textValuescls tx1 = new textValuescls();
                    tx1.key = Ac.AssocTypeID;
                    tx1.value = C1.BP_Unit__r.Name;                    
                    txstring.add(tx1);
                }
                else if(Ac.Description == 'Due Date')
                {   
                    string duedate = string.valueOf(C1.DueDate__c);
                    textValuescls tx2 = new textValuescls();
                    tx2.key = Ac.AssocTypeID;
                    tx2.value = duedate;                    
                    txstring.add(tx2);
                }
                else if (AC.Description == 'Case Title')
                {
                    textValuescls tx3 = new textValuescls();
                    tx3.key = Ac.AssocTypeID;
                    tx3.value = CaseTitelstr;                    
                    txstring.add(tx3); 
                }
                cd.currentUser = C1.LeasingAgentSAM__c;
                cd.metaDataValues = metadataValue ;
                cd.caseNotes = 'Testing REST API from Salesforce  Please ignore this case  ' + CurrentUserofSFstr; 
                cd.textValues = txstring;
                cd.caseTitle = CaseTitelstr;
                cd.caseType = 82 ;
                cd.assignTo = 'xyz'; 
            }
        }
        //Converting  CaseData object and parameters in json fromat 
        String JSONString = JSON.serialize(cd);
        System.debug('Serialized list of invoices into JSON format: ' + JSONString);
        Http client1 = new Http();
        HttpRequest req1 = new HttpRequest();
        req1.setEndpoint('------------------------------');
        req1.setMethod('POST');      
        req1.setHeader('content-type', 'application/json');
        req1.setHeader('Authorization', 'bearer ' + access_token);
        req1.setBody(JSONString);
        HttpResponse res1 = client1.send(req1);
        string caseDataFinal = res1.getBody();
        system.debug('Final test ' + caseDataFinal);
        APIResponseCaseData APIResCaseData = new APIResponseCaseData();
        APIResCaseData = (APIResponseCaseData) System.JSON.deserialize(caseDataFinal, APIResponseCaseData.class);
        Integer caseIdFinal = APIResCaseData.ResponseContent;
        system.debug('Final test ' + caseIdFinal);
        ID coid = Id.valueOf(CID2);
        system.debug('^^^^^^^ID^^^^^^' + coid);
        List<Contract> CList = new List<Contract>();
        contract con = new Contract();
        //con.Id = coid;
        con.BCR_Case_Id__c = caseIdFinal;
        CList.add(con);
        Update CList;
    return C;
    }**
}

Mock Class :
global class CreateCasesByContractMock implements HttpCalloutMock {

    global HTTPResponse respond(HTTPRequest request) {

        // Create a fake response
        HttpResponse response = new HttpResponse();
        response.setHeader('Content-Type', 'application/json');
        response.setBody(' {"caseTitle": "4200t  X 520 Broker Commission Request ",  "caseType": 82,  "assignTo": "JigneshC",  "currentUser": "Testing"}');
        response.setStatusCode(200);
        return response; 

    }*  

}

Test Class :
@isTest Public class TestCreateCasesByContract{

    Public Static testmethod void mytest()

    {  
        Test.setMock(HttpCalloutMock.class, new CreateCasesByContractMock()); 

        HttpResponse  response = New HttpResponse ();
        test.startTest();
        CreateCasesByContract.GetToken('userName', 'password');
        test.stopTest();



    }

    public static testmethod  void testsaveDataToSF()
    {
        Test.setMock(HttpCalloutMock.class, new CreateCasesByContractMock());


        AssocType AC = New AssocType();

        test.startTest();
        CreateCasesByContract.CreateCase();
        test.stopTest();

    }**


}

 
  • April 05, 2017
  • Like
  • 0
Hello Guys  I am facing the issue  last  few days let me know if anyone have good idea about this issue. I also got the 100% code coeverage of the class but the method is going fail with Methods defined as TestMethod do not support Web service callouts in Test class..Error
global with Sharing class WebserviceCreateCME {
    
    
    webservice static Void CreateCME(Id ContractId)
    {
      
        CreateCasesByContract.CreateCase();
        
    }
    
    
}
Test Class 
@isTest
Public with Sharing class TestWebserviceCreateCME {
    @IsTest Static void WebserviceTestMethod()
        
    {  
            
        Id retailRecordTypeId = [ SELECT Id,Name FROM RecordType WHERE name='Retail Contract' AND SObjectType='Contract' limit 1].Id;
        
        NAICS_Code__c nacObj = new NAICS_Code__c(
            name = 'nac code01');
        
        insert nacObj;
        
        Leasing_Agent__c l = new Leasing_Agent__c(
            name = 'Name',
            EmployeeID__c = 12,
            InActiveDate__c = date.today(),
            IS_ACTIVE__c = true,
            LeasingAgentID__c = 14
        );
        
        insert l;
        
        BP_Property__c bp_property = new BP_Property__c(
            name = 'BP_Property__c',
            AvailableArea__c = 22402,
            AvailableCount__c = 28,
            BD_Owner_Entity_ID__c = 45,
            BD_Property_ID__c = 32,
            Building_Count__c = 1,
            Colloquial_Owner__c = 'David Haug',
            InActiveDate__c = date.today(),
            IS_ACTIVE__c = true,
            Leasing_Agent__c = l.id,
            Lender__c = 'lender',            
            Market_Name__c =  'market name',
            Occupancy__c = 46,
            Owner_Entity__c = 'owner entity',
            Pay_To_Name__c = 'pay to name',
            Payment_Address__c = 'payment address',
            Payment_City__c = 'payment city',
            Payment_State__c = 'payment state',
            Payment_Suite__c = 'suite',
            Payment_Zip__c = '12323',
            PropChargeCAM__c = 47,
            PropChargeElectric__c = 1234,
            PropChargeNNN__c = 48,
            PropCurrentYearExpenses__c = 49,
            Property_Fax__c = '1231231234',
            Property_City__c = 'property city',
            Property_Code__c = 'property code',
            Property_ID__c = 49,
            Property_Manager__c = 'manager',
            Property_Name__c = 'property name',
            Property_SQFT__c = 49,
            Property_State__c = 'property state',
            Property_Street__c = 'property street',
            Property_Zip__c = '12312',
            PropGrossArea_c__c = 1234
        );
        
        insert bp_property;
        
        Building__c building = new Building__c(
            name = 'building name',
            PropertyIDYardi__c = 1227,
            PropertyIDBD__c = 23,
            PropertyCode__c = 'm2323dh',
            BuildingIDBD__c = 33,
            Building_State__c = 'building state',
            BuildingStreet__c = 'building street',
            BuildingZip__c = '12312',
            Building_City__c = 'building city',
            IS_ACTIVE__c = true,
            BDBuildingName__c = '2323 South Voss Rd',
            Google_Review_URL__c = 'http://www.google.com',
            Yelp_Review_URL__c = 'http://www.yelp.com',
            InActiveDate__c = date.today(),
            BldgGrossArea__c = 40,
            BP_Property__c = bp_property.id
        );
        
        insert building;
        
        BP_Unit__c bp_unit = new BP_Unit__c(
            name = 'bp unit name',
            BD_Availability_Status__c = 'status',
            BD_BuildingID__c = 50,
            BD_PropertyID__c = 51,
            BD_UnitID__c = 52,
            BD_UnitNum__c = '53',
            BP_Property__c = bp_property.id,
            Building__c = building.id,
            InActiveDate__c = date.today(),
            IS_ACTIVE__c = true,
            SF_Unit_Status__c = 'status',
            Size__c = 54,
            Type__c = 'type',
            Unit_Rate__c = 55,
            Unit_Recommended_Rent__c = 56,
            Unit_Sub_Category__c = 'sub category',
            Yardi_Unit_ID__c = 57,
            Yardi_Unit_Num__c = 'unit num');
        
        insert bp_unit;
        
        Account account = new Account(
            name = 'account name',
            type = 'owner',
            NAICS_Code__c = nacObj.Id,
            NAICS_Code_4__c = 'Accounting, Tax Preparation, Bookkeeping, and Payroll Services | 5412',
            Industry = 'Energy');
        
        insert account;
        
        Contact contact = new Contact(
            lastname = 'nguyen',
            accountid = account.id);
        
        insert contact;     
        
        Contact contractContact = new Contact(
            lastname = 'test',
            MailingStreet  = 'MailingStreet',
            MailingCity = 'MailingCity',
            MailingState = 'MailingState',
            MailingPostalCode = 'MailingPostalCode',
            
            accountid = account.id);
        
        insert contractContact; 
        
        Account brokeraccount = new Account(
            name = 'broker account',
            type = 'owner');
        
        insert brokeraccount;
        
        Opportunity Oppt = new Opportunity(
            Name='test opportunity', 
            Status__c = 'Actively Looking',            
            StageName='Initial Inquiry', 
            CloseDate= system.today(),
            Leasing_Agent__c = l.id,
            AccountID = account.id,
            LeadSource = 'Test Lead Source',
            Commencement_Date__c = Date.today(),
            Lease_Expiration_Date__c = Date.today(),
            Lease_Signed_Date__c = Date.today(),
            Lease_Square_Feet__c = 12345,
            Suite__c = 'Test Suite',
            Preferred_size__c = '100-500');
        
        Insert Oppt;
        
        Contract c = new Contract(
            Absorbed_Explanation__c = 'explanation',
            Additional_Monthly_Charge_Notes__c = 'notes',
            After_hour_Utilities_Detail__c = 'utility details',
            After_hour_Utilities__c = 'yes',
            ATTN__c = 'attn',
            Breakpoint__c = 6,
            Broker_Comm_Paid__c = 7,
            Brokerage_services_info_given__c = 'info given',
            Broker__c = contact.Id,
            Broker_involved__c = 'Yes',
            CAM__c = 8,
            Rent_Commencement_Date__c = date.today(),
            Comments__c = 'comments',
            Net_TI__c = 9,
            ETIC__c = 10,
            Other_Expenses__c = 11,
            Space_Leased__c = '12',
            Tenant_Prepaid__c = 13,
            TI_Applied_To__c = 'Free Rent',
            TI_Credit__c = 14,
            Other_Description__c = 'other description', 
            Contact_Email__c = 'minh@email.com',
            Base_Mo_Yr__c = date.today(),
            CPI_Cap__c = 15,
            Deposit_Transfer_Amount__c = 16,
            Elec__c = 17,
            Elec_Options__c = 'elec options',
            Escalation_Cap__c = 3,
            X1st_Mth_Rent_Received__c = 'first month rent recieved',     
            Guarantor__c = contact.id,
            Holdover_Lease_Backdated__c = 'holdover lease backdated',
            Holdover_Not_Std__c = 17,
            How_Long__c = date.today(),
            Initial_Agreement_Start_Date__c = date.today(),
            Insurance__c = 18,
            Lease_Agreement__c = 'lease agreement',
            Lease_Type__c = 'lease type',
            Lease_Type_Comments__c = 'lease comments',
            MLS_Comment__c = 'mls comment',
            MLS_Type__c = 'Lease',
            Non_Standard_Fee_Desc__c = 'non std fee desc',
            Non_Std_Fee__c = '24',
            OPEX_Base__c = date.today(),
            OPEX_Stop__c = 25,
            Other_Monthly_Charge__c = 26,
            Other_Monthly_Charge_Desc__c = 'monthly charge desc',
            Other_Provisions__c = 'other provisions',
            Parking__c = 27,
            PT_Other_Desc__c = 'pt other desc',
            PT_Type__c = 'type',
            Payment_not_in_full_details__c = 'payment not in full details',
            Payment_Type__c = 'payment type',
            Percent_Rent__c = 28,
            Prior_Annual_Rate__c = 29,
            Pro_Rata_Share__c = 30,
            Promo_Mktg__c = 31,
            Renewal_Option_Detail__c = 'renewal option detail',
            Renewal_Option__c = 'renewal option',
            Rent_Adjustment__c = 'rent adjustment',
            Reserved_Parking_Detail__c = 'reserved parking detail',
            Reserved_Parking__c = 'reserved parking', 
            Right_of_First_Refusal_Detail__c = 'refusal detail',
            Right_of_First_Refusal__c = 'first refusal', 
            Security_Deposit__c = 32,
            Security_Deposit_Received__c = '33',
            Signage__c = 34,
            Special_Provisions__c = 'special provisions',
            Storage__c = 76,
            Taxes__c = 35,
            Tenant_From__c = 'tenant from',
            Term_Type__c = 'term type',
            Termination_Option_Date__c = date.today(),
            Termination_Option_Detail__c = 'termination option detail',
            Termination_Option__c = 'termination option',         
            Unit_Num_On_Lease__c = 'a02',
            USA_Patriot_Act__c = 'usa patriot act',        
            Prorated_rent_due__c = 37,
            What_Happened__c = 'what happened',
            Late_Fee_Pct__c = 38,
            Rent_Due_Date__c = 'rent due date',
            Hold_Over_Percentage__c = 39,
            //MLS_TRAN_ID__c,
            deactivation_reason__c = 'deactivation reason',
            deactivation_date__c = date.today(),
            CME_Case_ID__c = 40,
            accountid = account.id,
            Building__c = building.id,
            BP_Unit__c = bp_unit.id,
            Manual_Contract_End_Date__c = system.today(),
            Status = 'Lease Signed By Tenant',
            Contract_Contact__c = contractContact.Id,
            CustomerSignedDate = system.today(),            
            Opportunity__c = oppt.id,
            RecordTypeID = retailRecordTypeId
        );
        
        
        insert c;
        
        
        WebserviceCreateCME.CreateCME(c.Id);
    }
}




  • April 07, 2017
  • Like
  • 0
Dear Friends,

I have completed 11 Badges and I received two emails one with subject 'High five! Your t-shirt is on its way.' and another with subject 'Confirm your mailing address to receive your Trailhead t-shirt'. When I try to confirm my address the given link navigating to pardot account.But I don't have pardot account.Please help me...

Thanks,
Hussey
  • February 26, 2015
  • Like
  • 0