• Deepak Dinesh
  • NEWBIE
  • 80 Points
  • Member since 2018

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 13
    Replies
Hi, 
  
Please suggest me how to update all child and grand child when parent account field is updated in account. 

Example: Each account has a parent lookup field of account. 

We created a checkbox called Global in account when this field is updated in account all its assocaited children and grand children "Global Account" checkbox should be checked please suggest me how to add this logic. Similarly when unchecked all childres and grand childrens should get "Global Account" be unchecked. 

Thanks
Sudhir 
Hi Friends

i have two object object 1 and object 2 withoud any relationship condition 1;- both have same fields ex= firstName,city, status
if the first time insrt a record in object 1 then status is New.but doest not insrt Record in object 2.
conditon 2 :- if the update status approved then insert the record in Object 2.

please support

Thanks
Ishrat
 
  • October 28, 2019
  • Like
  • 0
Hi, 
  
Please suggest me how to update all child and grand child when parent account field is updated in account. 

Example: Each account has a parent lookup field of account. 

We created a checkbox called Global in account when this field is updated in account all its assocaited children and grand children "Global Account" checkbox should be checked please suggest me how to add this logic. Similarly when unchecked all childres and grand childrens should get "Global Account" be unchecked. 

Thanks
Sudhir 
Hi Experts
Here is a question regarding Email to Case. In my org, we use Email to Case. The Subject of email-to-case is like : "Credit Hold : (ABCDEFGH ) : Sales Order : 1236589kmjl456" Where ABCDEFGH = Account name.
On Case Page layout, we have a field = Account name. Is there a way that This field can be auto filled from Subject by finding the string in ()? Because the Account name in subject is always in ( ).
I am an Admin so, I don't know much coding. Any help will be highly appreciated.
Regards
Hi Friends

i have two object object 1 and object 2 withoud any relationship condition 1;- both have same fields ex= firstName,city, status
if the first time insrt a record in object 1 then status is New.but doest not insrt Record in object 2.
conditon 2 :- if the update status approved then insert the record in Object 2.

please support

Thanks
Ishrat
 
  • October 28, 2019
  • Like
  • 0
i have a requirement to share notes to single group ,
Custom component - Create a  button(share) by clicking on that share button notes will be sent to single Group.
Hi,

In Salesforce documentation, i read contact id does not count against email limitation. But it does counting.

Please refer the below code:
Messaging.SingleEmailMessage[] lst_EmailMsg = new List<Messaging.SingleEmailMessage>();
for (contact con : [SELECT Id from Contact where Email like '%ABC%']) {
	Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
	mail.setTargetObjectId(con.ID);
	mail.setSubject('TEST subject');
	mail.setPlainTextBody('test');
	mail.setHtmlBody('test');
	lst_EmailMsg.add(mail);
}
Messaging.SendEmailResult[] lst_EmailResults = Messaging.sendEmail(lst_EmailMsg, false);

 
I have a query like we have a permission set with license as none,can we edit tab settings for this,I can find tab settings when click edit on a object were we need to make changes.
Hi all,

I have apex method that will send outbound email. The issue is "it Count against singleEmail limit for contact and lead, but not for user"?
List<TSB__Survey_Recipients__c> lst_SurveyRecipients = [SELECT Id, TSB__ObjectId__c, TSB__Email_Address__c, TSB__Survey_Master__c FROM TSB__Survey_Recipients__c WHERE Id IN :lst_SurveyRecipientsToProcess];
        Set<String> st_StandardObjIdPrefixes = new Set<String> {'003', '005', '00Q'};
		if (!lst_SurveyRecipients.isEmpty()) {
            TSB__Survey_Master__c surMaster = [SELECT Id, TSB__Email_Template__c, TSB__From_Name__c, TSB__From_Address__c FROM TSB__Survey_Master__c WHERE Id = :lst_SurveyRecipients[0].TSB__Survey_Master__c];
            OrgWideEmailAddress[] owdEmailAddr = [select Id from OrgWideEmailAddress where Address = :surMaster.TSB__From_Address__c];
            String domainUrl = getSiteUrlString();
			Messaging.SingleEmailMessage[] lst_EmailMsg = new List<Messaging.SingleEmailMessage>();
            for (TSB__Survey_Recipients__c surveyRecipient : lst_SurveyRecipients) {
            	Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
				if (String.isNotBlank(surveyRecipient.TSB__ObjectId__c) && (surveyRecipient.TSB__ObjectId__c.length() == 18) && st_StandardObjIdPrefixes.contains(surveyRecipient.TSB__ObjectId__c.subString(0, 3))) {
					System.debug('passing Id = '+surveyRecipient.TSB__ObjectId__c);
					//mail.setToAddresses(new String[]{surveyRecipient.TSB__ObjectId__c});
					mail.setTargetObjectId(surveyRecipient.TSB__ObjectId__c);
					mail.setTreatTargetObjectAsRecipient(true);
					mail.setSaveAsActivity(false);
					if (surveyRecipient.TSB__ObjectId__c.startsWithIgnoreCase('005')) {
						mail.setSaveAsActivity(false);
					}
				} else {
					System.debug('passing email Id = '+surveyRecipient.TSB__Email_Address__c);
					mail.setToAddresses(new String[]{surveyRecipient.TSB__Email_Address__c});
				}
				if (String.isNotBlank(emailSubject)) {
					mail.setSubject(emailSubject);
				}
                if (!owdEmailAddr.isEmpty()) {
                    mail.setOrgWideEmailAddressId(owdEmailAddr[0].Id);
                } else if (String.isNotBlank(surMaster.TSB__From_Name__c)) {
                	mail.setSenderDisplayName(surMaster.TSB__From_Name__c);  
                }
				if (String.isNotBlank(emailBody)) {
					emailBody = emailBody.unEscapeHtml4();
					String url='<a href=\''+domainUrl+surveyRecipient.Id+'\'>click here</a>';					
					emailBody = emailBody.replaceAll('<URL>', url);
					mail.setPlainTextBody(emailBody);
                	mail.setHtmlBody(emailBody);
				}
				System.debug('get Target Object ID = '+mail.getTargetObjectId());
				System.debug('get To Address = '+mail.getToAddresses());
                lst_EmailMsg.add(mail);
            }
            Messaging.SendEmailResult[] lst_EmailResults = Messaging.sendEmail(lst_EmailMsg, false);
			for (Integer i = 0; i < lst_EmailResults.size(); i++) {
				Messaging.SendEmailResult emailResult = lst_EmailResults[i];
				if (emailResult.isSuccess()) {
					lst_SurveyRecipients[i].TSB__Survey_Status__c = 'Email Sent';
				} else {
					lst_SurveyRecipients[i].TSB__Survey_Status__c = 'Delivery Failed';
					lst_SurveyRecipients[i].TSB__Delivery_Failed_Reason__c = '';
					for (Messaging.SendEmailError emailError : emailResult.getErrors()) {
						lst_SurveyRecipients[i].TSB__Delivery_Failed_Reason__c += emailError.getMessage();
					}
				}
			}
			Database.update(lst_SurveyRecipients, false);
		}

 

Hi,

 

I have custom object called "Order" and "Oder Line Items". I wanted to have a "Clone" button on my page layout.

The button should work similar to standard clone button on Opportunity ie. while cloning my "Order"; i want it to ask me for Record Type and an option to clone with the "Order Line Items".

 

Is it possible using standard clone button. Also, anything needs to be done apart from adding "Clone" button page layout?