• Tarun Mukhia
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 11
    Replies
Hi,
I want to add one line to the trigger.
On-boarding owner to be changed to match the Applicant's Hiring Manager. 
Can someone please help. 
User-added image
Thanks
Tarun

 
Hi,

We have a button. I want to add validation to it if "AR"  Or "Billing Address" fields is blank then stop user.
How can I add this as a seperate alert message "AR field is mandatory" & "Billing Address is Mandatory"?
Thanks
Tarun

{!requireScript("/soap/ajax/26.0/connection.js")} 
var proceed = true; 

if("{!Account.Account_Number__c}"!="") { 
alert("This Account has already been on-boarded"); 
proceed=false; 
} else if("{!Account.Validation_Requested_On__c}"!="") { 
proceed = confirm("It appears that a user has already requested on-boarding for this Account (Requested By: {!Account.Validation_Requested_By__c}, on {!Account.Validation_Requested_On__c}).\n\nWould you still like to request that this Account be on-boarded?"); 

 
Hi,

I am suck at this. Can someone help?

The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
Check challenge


Thanks
Tarun
Hi,

I am stuck at this challange. 

-Create an Apex class that returns an array (or list) of strings.
-Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
-The Apex class must be called 'StringArrayTest' and be in the public scope.
-The Apex class must have a public static method called 'generateStringArray'.
-The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
Hi,
I have created a button to take the user directly to the printable view, but when they use it, "Print Page" link works but "Close Window" link dosen't work.
What did I miss?

User-added image
User-added image

User-added image

Thanks
Tarun
Hi,
I am trying the finish the hands-on, but it is not matching with the module. How can I proceed?
Thanks

User-added image
Hi,

Can somoene please guide me with the steps to finish this task? I tied many differnt ways but it is not working.
User-added image

Thanks
Tarun


 
Hi,
We have a setup where Cases are automatically created and priority is set based on the predefined priority defination(Screenshot 1). I think this is the Class that runs this process( Below screenshots).
Process is not running properly.
45TC92 was reserved booked in both SC/SF and expected to be picked up yesterday 9/16/15 but SC/SF did not make a case for it or put it into priority. any idea why it did not create it's own case (Screenshot 2)

How can i find where the problem is?

User-added image
User-added image

Apex Class

  Map<Id, Part__c> records = new Map<Id, Part__c>();
        for (Part__c r : trailers) {
            Boolean isFleet = r.Ownership__c == 'Fleet';
            Boolean isDealership = r.Ownership__c == 'Dealership';
            Boolean isCustomer = r.Ownership__c == 'Customer';
            Boolean isRent = r.Account__c != null;
            Integer nextSafeties = r.Next_Safety_Date__c == null ? null : today.daysBetween(r.Next_Safety_Date__c);
            Integer nextCVI = nextSafeties;
            Integer nextPickup = r.Reservations__r == null || r.Reservations__r.isEmpty() ? null : today.daysBetween(r.Reservations__r[0].Pickup_Date__c);
            Integer sold = r.Sold_Date__c == null ? null : today.daysBetween(r.Sold_Date__c);
            Integer promised = trailerCheckOutTimes.containsKey(r.Id) ? today.daysBetween(trailerCheckOutTimes.get(r.Id)) : null;
            Integer lastFullService = r.Last_Full_Service_Date__c == null ? null : today.daysBetween(r.Last_Full_Service_Date__c);
            Decimal inServiceRate = inServiceRates.get(r.Branch__c + '|' + r.Trailer_Class__c);
            Boolean requiresPM = !r.Container_Trailer__c && nextSafeties < 90 && ((lastFullService > 180 && r.Location__c == 'Fleet East') || (r.PEP_Program__c != 'Y' && r.Location__c == 'Fleet West'));
            Boolean requirePDI = r.PDI_Date__c != null;
            Boolean requireRepair = trailerERS.contains(r.Id);
            Boolean isShort = r.Out_of_Service_Duration_Code__c == 'S';
            Boolean isMedium = r.Out_of_Service_Duration_Code__c == 'M';
            Boolean isLong = r.Out_of_Service_Duration_Code__c == 'L';
            Boolean isOOS = isShort || isMedium || isLong;
            Boolean isBlocked = r.Out_of_Service_Blocked_Code__c != null && r.Out_of_Service_Blocked_Code__c != 'N';
            Boolean inYard = r.Yard__c != null;
            Boolean excludeYard = excludedYards.contains(r.Yard__c);
            Boolean excludeClass = excludedClasses.contains(r.Trailer_Class__c);

            System.debug('Trailer --- isFleet: ' + isFleet + ', isDealership:' + isDealership + ', isCustomer:' + isCustomer + ', isRent:' + isRent + ', nextSafeties:' + nextSafeties + ', nextCVI:' + nextCVI + ', nextPickup:' + nextPickup + ', sold:' + sold + ', promised:' + promised + ', lastFullService:' + lastFullService + ', inServiceRate:' + inServiceRate + ', requiresPM:' + requiresPM + ', requirePDI:' + requirePDI + ', requireRepair:' + requireRepair + ', isShort:' + isShort + ', isMedium:' + isMedium + ', isLong:' + isLong + ', isOOS:' + isOOS + ', isBlocked:' + isBlocked + ', inYard:' + inYard);
            
            System.debug('Reservations: ' + r.Reservations__r);
            
            String priority = '99';
            if (excludeClass) {
                // Leave blank, already set to 99
            } else if (excludeYard) {
                priority = '15';
            } else if (isFleet && isRent && requireRepair) {
                priority = '1';
            } else if (isFleet && isRent && (requiresPM || nextCVI < 7)) {
                priority = '2';
            } else if (isFleet && nextPickup < 2 && isOOS) {
                priority = '3';
            } else if (isDealership && requirePDI && sold < 2) {
                priority = '4';
            } else if (isCustomer && promised < 2) {
                priority = '5';
            } else if (isFleet && nextPickup < 7 && (isLong || isMedium)) {
                priority = '6';
            } else if (isDealership && requirePDI && sold < 7) {
                priority = '7';
            } else if (isFleet && nextPickup == null && (nextSafeties < 30 || requiresPM)) {
                priority = '8';
            } else if (isCustomer && promised < 7) {
                priority = '9';
            } else if (isFleet && (isShort || isMedium) && !isBlocked && inServiceRate < 50) {
                priority = '10';
            } else if (isFleet && nextCVI < 60) {
                priority = '11';
            } else if (isDealership && requirePDI && nextPickup >= 8) {
                priority = '12';
            }

            if (r.Priority__c != priority) {
                records.put(r.Id, new Part__c(
                    Id = r.Id,
                    Priority__c = priority
                ));
            }
        }

        return records;
    }
}
 


 
Hi,
I want to add one line to the trigger.
On-boarding owner to be changed to match the Applicant's Hiring Manager. 
Can someone please help. 
User-added image
Thanks
Tarun

 
Hi,

We have a button. I want to add validation to it if "AR"  Or "Billing Address" fields is blank then stop user.
How can I add this as a seperate alert message "AR field is mandatory" & "Billing Address is Mandatory"?
Thanks
Tarun

{!requireScript("/soap/ajax/26.0/connection.js")} 
var proceed = true; 

if("{!Account.Account_Number__c}"!="") { 
alert("This Account has already been on-boarded"); 
proceed=false; 
} else if("{!Account.Validation_Requested_On__c}"!="") { 
proceed = confirm("It appears that a user has already requested on-boarding for this Account (Requested By: {!Account.Validation_Requested_By__c}, on {!Account.Validation_Requested_On__c}).\n\nWould you still like to request that this Account be on-boarded?"); 

 
Hi,

I am stuck at this challange. 

-Create an Apex class that returns an array (or list) of strings.
-Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
-The Apex class must be called 'StringArrayTest' and be in the public scope.
-The Apex class must have a public static method called 'generateStringArray'.
-The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
Hi,

Can somoene please guide me with the steps to finish this task? I tied many differnt ways but it is not working.
User-added image

Thanks
Tarun