-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
8Questions
-
11Replies
How to change the owner of the record via trigger?
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.
Thanks
Tarun
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.
Thanks
Tarun
- Tarun Mukhia
- August 28, 2020
- Like
- 0
- Continue reading or reply
Need help with custom button
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?");
}
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?");
}
- Tarun Mukhia
- April 03, 2018
- Like
- 0
- Continue reading or reply
Stuck at Trailhead Hands On - Need Help
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
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
- Tarun Mukhia
- January 11, 2018
- Like
- 0
- Continue reading or reply
Stuck at Trailhead Hand-On Challange - Need Help !
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.
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.
- Tarun Mukhia
- January 09, 2018
- Like
- 0
- Continue reading or reply
Custom Button Help
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?
Thanks
Tarun
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?
Thanks
Tarun
- Tarun Mukhia
- August 25, 2017
- Like
- 0
- Continue reading or reply
Hands-on is not matching with the Module
Hi,
I am trying the finish the hands-on, but it is not matching with the module. How can I proceed?
Thanks
I am trying the finish the hands-on, but it is not matching with the module. How can I proceed?
Thanks
- Tarun Mukhia
- June 02, 2017
- Like
- 0
- Continue reading or reply
Need Help in Process Bulider Task.
Hi,
Can somoene please guide me with the steps to finish this task? I tied many differnt ways but it is not working.
Thanks
Tarun
Can somoene please guide me with the steps to finish this task? I tied many differnt ways but it is not working.
Thanks
Tarun
- Tarun Mukhia
- September 18, 2015
- Like
- 0
- Continue reading or reply
Apex Class is not working properly?
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?
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;
}
}
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?
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;
}
}
- Tarun Mukhia
- September 18, 2015
- Like
- 0
- Continue reading or reply
How to change the owner of the record via trigger?
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.
Thanks
Tarun
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.
Thanks
Tarun
- Tarun Mukhia
- August 28, 2020
- Like
- 0
- Continue reading or reply
Need help with custom button
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?");
}
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?");
}
- Tarun Mukhia
- April 03, 2018
- Like
- 0
- Continue reading or reply
Stuck at Trailhead Hand-On Challange - Need Help !
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.
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.
- Tarun Mukhia
- January 09, 2018
- Like
- 0
- Continue reading or reply
Need Help in Process Bulider Task.
Hi,
Can somoene please guide me with the steps to finish this task? I tied many differnt ways but it is not working.
Thanks
Tarun
Can somoene please guide me with the steps to finish this task? I tied many differnt ways but it is not working.
Thanks
Tarun
- Tarun Mukhia
- September 18, 2015
- Like
- 0
- Continue reading or reply