-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
5Questions
-
3Replies
How to validate field data type with populated value using trigger?
how to check field data type with populated value using trigger?
we have an object called data update with below fields,
Field 1 -> Field 1 value
Field 2 -> Field 2 value
Here Field 1 will select from a picklist with label as Field 1 and api name is Field _1__c and Field 1 value is a text field.
And similarly,
Here Field 2 will select from picklist (but object level created as a check box ) with label as Field 2 and api name is Field _2__c and Field 2 value with a text field.
Now how to validate object level field datatype with populated value using trigger.?
we have an object called data update with below fields,
Field 1 -> Field 1 value
Field 2 -> Field 2 value
Here Field 1 will select from a picklist with label as Field 1 and api name is Field _1__c and Field 1 value is a text field.
And similarly,
Here Field 2 will select from picklist (but object level created as a check box ) with label as Field 2 and api name is Field _2__c and Field 2 value with a text field.
Now how to validate object level field datatype with populated value using trigger.?
- Mahesh sfdc 5
- June 04, 2021
- Like
- 0
- Continue reading or reply
how to restrict picklist value using validation rule
Hi,
If Account type(picklist) is "ABC" and while creating contact ,On contact the field type(picklist) should be "Operations" if we select any other except "operations" it should through an error.
Error Message : ABC account should have a contact type operations.
Please suggest.
If Account type(picklist) is "ABC" and while creating contact ,On contact the field type(picklist) should be "Operations" if we select any other except "operations" it should through an error.
Error Message : ABC account should have a contact type operations.
Please suggest.
- Mahesh sfdc 5
- April 12, 2019
- Like
- 0
- Continue reading or reply
Unable to cover code coverage for below test class
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
list<ProcessInstanceWorkitem> lstApprovalProcess = new list<ProcessInstanceWorkitem>();
set<ID> setUserID = new set<ID>();
String subToCompare = 'Approver';
String strUSerID = email.plainTextBody;
List<String> lstID = strUSerID.split('-');
System.debug('lstID is:'+ lstID );
if(email.subject.contains(subToCompare) && !lstID.isEmpty() )
{
for(ProcessInstanceWorkitem objProcessInstance: [Select p.Id,
p.ProcessInstanceId,
p.ProcessInstance.Status,
p.ProcessInstance.TargetObjectId,
p.ActorId,
p.OriginalActorId,
p.CreatedById,
p.CreatedDate
from ProcessInstanceWorkitem p
where p.ProcessInstance.TargetObjectId = : lstID[0]]){
if(lstID[1] != null && lstID[1] != ''){
string appID = (lstID[1]).trim();
if(appID.length() == 18 || appID.length() == 15){
objProcessInstance.ActorId = appID;
}
else if(appID.length() > 18){
objProcessInstance.ActorId = appID.subString(0,18);
}
}
lstApprovalProcess.add(objProcessInstance);
}
if(!lstApprovalProcess.isEmpty()){
update lstApprovalProcess;
}
}
return result;
}
}
Could you please assit on this,
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
list<ProcessInstanceWorkitem> lstApprovalProcess = new list<ProcessInstanceWorkitem>();
set<ID> setUserID = new set<ID>();
String subToCompare = 'Approver';
String strUSerID = email.plainTextBody;
List<String> lstID = strUSerID.split('-');
System.debug('lstID is:'+ lstID );
if(email.subject.contains(subToCompare) && !lstID.isEmpty() )
{
for(ProcessInstanceWorkitem objProcessInstance: [Select p.Id,
p.ProcessInstanceId,
p.ProcessInstance.Status,
p.ProcessInstance.TargetObjectId,
p.ActorId,
p.OriginalActorId,
p.CreatedById,
p.CreatedDate
from ProcessInstanceWorkitem p
where p.ProcessInstance.TargetObjectId = : lstID[0]]){
if(lstID[1] != null && lstID[1] != ''){
string appID = (lstID[1]).trim();
if(appID.length() == 18 || appID.length() == 15){
objProcessInstance.ActorId = appID;
}
else if(appID.length() > 18){
objProcessInstance.ActorId = appID.subString(0,18);
}
}
lstApprovalProcess.add(objProcessInstance);
}
if(!lstApprovalProcess.isEmpty()){
update lstApprovalProcess;
}
}
return result;
}
}
Could you please assit on this,
- Mahesh sfdc 5
- December 13, 2018
- Like
- 0
- Continue reading or reply
ATTENTION: Premier+ Success Plan Courtesy License Replacement
Hi Every one,
For these type mails(Subject : ATTENTION: Premier+ Success Plan Courtesy License Replacement)
what action I have to take?.
Can anyone please suggest greatly appriciate..
Thanks,
For these type mails(Subject : ATTENTION: Premier+ Success Plan Courtesy License Replacement)
what action I have to take?.
Can anyone please suggest greatly appriciate..
Thanks,
- Mahesh sfdc 5
- June 16, 2016
- Like
- 0
- Continue reading or reply
Urgent : Can any one tell me how to resolve First error: [QUERY_TIMEOUT] Your query request was running for too long."?
Hi All,
Any on know how to resolve First error: [QUERY_TIMEOUT] Your query request was running for too long." ?
This the query I am using in my batch class start Method:
filterDate is Today date.
query = 'SELECT Id, Case__c FROM Case_Action__c WHERE Case__r.ClosedDate >= ' + filterDate + ' OR Case__r.ClosedDate = NULL ORDER BY Case__r.Temp_Case_Action_Date__c';
If any one help will appriciate.
Thanks,
Mahesh
Any on know how to resolve First error: [QUERY_TIMEOUT] Your query request was running for too long." ?
This the query I am using in my batch class start Method:
filterDate is Today date.
query = 'SELECT Id, Case__c FROM Case_Action__c WHERE Case__r.ClosedDate >= ' + filterDate + ' OR Case__r.ClosedDate = NULL ORDER BY Case__r.Temp_Case_Action_Date__c';
If any one help will appriciate.
Thanks,
Mahesh
- Mahesh sfdc 5
- June 05, 2016
- Like
- 0
- Continue reading or reply
How to validate field data type with populated value using trigger?
how to check field data type with populated value using trigger?
we have an object called data update with below fields,
Field 1 -> Field 1 value
Field 2 -> Field 2 value
Here Field 1 will select from a picklist with label as Field 1 and api name is Field _1__c and Field 1 value is a text field.
And similarly,
Here Field 2 will select from picklist (but object level created as a check box ) with label as Field 2 and api name is Field _2__c and Field 2 value with a text field.
Now how to validate object level field datatype with populated value using trigger.?
we have an object called data update with below fields,
Field 1 -> Field 1 value
Field 2 -> Field 2 value
Here Field 1 will select from a picklist with label as Field 1 and api name is Field _1__c and Field 1 value is a text field.
And similarly,
Here Field 2 will select from picklist (but object level created as a check box ) with label as Field 2 and api name is Field _2__c and Field 2 value with a text field.
Now how to validate object level field datatype with populated value using trigger.?
- Mahesh sfdc 5
- June 04, 2021
- Like
- 0
- Continue reading or reply
Urgent : Can any one tell me how to resolve First error: [QUERY_TIMEOUT] Your query request was running for too long."?
Hi All,
Any on know how to resolve First error: [QUERY_TIMEOUT] Your query request was running for too long." ?
This the query I am using in my batch class start Method:
filterDate is Today date.
query = 'SELECT Id, Case__c FROM Case_Action__c WHERE Case__r.ClosedDate >= ' + filterDate + ' OR Case__r.ClosedDate = NULL ORDER BY Case__r.Temp_Case_Action_Date__c';
If any one help will appriciate.
Thanks,
Mahesh
Any on know how to resolve First error: [QUERY_TIMEOUT] Your query request was running for too long." ?
This the query I am using in my batch class start Method:
filterDate is Today date.
query = 'SELECT Id, Case__c FROM Case_Action__c WHERE Case__r.ClosedDate >= ' + filterDate + ' OR Case__r.ClosedDate = NULL ORDER BY Case__r.Temp_Case_Action_Date__c';
If any one help will appriciate.
Thanks,
Mahesh
- Mahesh sfdc 5
- June 05, 2016
- Like
- 0
- Continue reading or reply
Report folder acess setting
Helloo,
How is it possible to give read aces for Report folde to certain users and read write acess to certain users
How is it possible to give read aces for Report folde to certain users and read write acess to certain users
- Ab
- September 25, 2015
- Like
- 0
- Continue reading or reply