• SAI CHARAN MADUGULA
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 10
    Replies
Hello Team,

IF(ISPICKVAL(Status__c, 'Completed'),IMAGE("/servlet/servlet.FileDownload?file=015S0000000dYFi", "Green", 9, 15)&"Completed",

I have used the above formula to populate the colour image for the field.But the strange thing is it is showning the  colour image for me, but when i logged into user profile and check on the field it is not populating/showing the image.

My profile is system admin and the user have different profile can any body please help/suggest me on this to show this colour image for the user profile.


Thanks!!
 
Hi team,

I need to add the <Account link> SFDC Link in the  HTML Template (Unfiled Public Email Templates).Can anybody please help me out for this.

Thanks

 
Hello All,

Can any one helpme on this Functionality

I have a 5 Checkboxes 
Completed_FieldActivation__c
Completed_FieldActivation1__c
Completed_FieldActivation2__c
Completed_FieldActivation3__c
Completed_FieldActivation4__c

And a there is One Status__c picklist Field,In that Picklist Value is "Completed".        
And RecordType.id = '012S00000000mUU'
I have to write a validation rule to to Mandate all the checkboxes must be checked when they change the status picklist Field to "Completed"

Error Message: All check boxes must be clicked in order to allow the Task Status to be “Complete”
Hello All,
Can any one suggest me on this!!
I have a custom Object called Task in that i have a picklist Field called Completed in that picklist values are yes or No. So i have to write a visualforce page to render the fields by selecting the picklist value Yes.If Yes i have to render the Fields and i have to add this visual force page on the pagelayout.

section Name: xyzz
Object: Task
Fields : 1.xyz
            2.xyz
            3.xyz
I have to render this fields by selecting yes.
      
 
 
Hello All,

Can anybody explain how to solve this?

1.I have to write a validation on the Contact with refrence to Account 
2.On the Contact there is a field called Role,it is a picklist value 
3.In that Picklist value i have to select XYZ Value and saved the contact on a account.
4.XYZ is the mandatory picklist value and user have to select this value.
5.If user tries to create a new contact again with a Role by selecting this xyzz picklist value. We have to fire the validation 

Requirement Question: 
Create a validation Rule To mandate a user not to create multiple contact on a single Account

Please help me out for this.


 
One of my Friend Asked this question can any one please exaplain this.

I just want to see what approach does each one of you would pick, if you are asked to mass upload a single attachment to multiple tasks in the system.
 
Thanks!!
 
Hello,
snap shot
I need a help regarding this issue.The problem is when i am creating the record from the user account and generating the Report the Owner Name is not changing.it should be same as created by because i am logging from that user and creating the record from that user so he should be the owner of that record and created by but here it is showing different Owner Name. 

Please explain this issue and suggest me if i need to change any thing in the code.

Object: custom object
Hi,

I am using this ip 0.0.0.0,255.255.255.255 in my full copy of sandbox org to login at my Home.Is there any problem with this.
OCRtrigger:
trigger OCRtrigger on OCR_Pharmacy__c (after update) {

    OCRTriggerHandler handler = new OCRTriggerHandler();
    
    handler.UpdateAccountOnAddressChange(trigger.new,Trigger.OldMap)

Trigger Handler: 
public class OCRTriggerHandler{

    public void UpdateAccountOnAddressChange(List<OCR_Pharmacy__c> OCRList, Map<Id,OCR_Pharmacy__c> TriggerOldMap){
    
        Set<Id> ocrIdSet = new Set<Id>();
        List<Account> accountToUpdateList = new List<Account>();
    
        for(OCR_Pharmacy__c OCR : OCRList){
            if((OCR.Address__c != TriggerOldMap.get(OCR.id).Address__c || OCR.City__c!= TriggerOldMap.get(OCR.id).City__c|| 
            OCR.State_Province__c != TriggerOldMap.get(OCR.id).State_Province__c ||
            OCR.Zip_Postal_Code__c != TriggerOldMap.get(OCR.id).Zip_Postal_Code__c || 
            OCR.Country__c!= TriggerOldMap.get(OCR.id).Country__c) && OCR.Status__c != 'Inactive'){
                ocrIdSet.add(OCR.Id);
            }
        }
        
        if(!ocrIdSet.isEmpty()){
            List<OCR_Pharmacy__c> ocrAccList = [
                Select Id,Address__c
                     , City__c
                     , State_Province__c
                     , Zip_Postal_Code__c
                     , Country__c
                     , (Select Id
                             , Distance_to_Service_Facility__c 
                          from Accounts__r
                         where (RecordType.Name = 'LTC Prospect Facility'
                         OR
                         RecordType.Name='LTC Customer Facility'
                         OR
                         RecordType.Name='LTC Former Facility'       
                         ) 
                           
                       )
                  from OCR_Pharmacy__c where Id IN : ocrIdSet
            ];
            
            
            for(OCR_Pharmacy__c OCR : ocrAccList){
                //system.assert(false, '(OCR.Accounts__r.size()' + OCR.Accounts__r.size());
                if(OCR.Accounts__r.size()>0){
                    for(Account acc : OCR.Accounts__r){
                        if(acc.Distance_to_Service_Facility__c <= 0 || String.isBlank(String.valueOf(acc.Distance_to_Service_Facility__c))) {
                            if(Schema.SObjectType.Account.fields.Distance_to_Service_Facility__c.isUpdateable() && Schema.SObjectType.Account.fields.Override_Calculate_Miles__c.isUpdateable()){
                                acc.Distance_to_Service_Facility__c = NULL;
                                acc.Override_Calculate_Miles__c = false;
                                accountToUpdateList.add(acc);
                            }
                            
                        }
                    }
                }    
            }
            if(!accountToUpdateList.isEmpty() && Schema.SObjectType.Account.isUpdateable()){
                update accountToUpdateList ;
            }
        }
        
    }

}
Hello All,
Can Anbody tell what is the issue please.

I am getting the like this Error:Apex trigger OCRtrigger caused an unexpected exception, contact your administrator: OCRtrigger: System.LimitException: Apex CPU time limit exceeded. I checked the debug logs it is shows the result like this.

Debug logs:

Class.AccountTriggerHandler.calculateDistance: line 572, column 1
Trigger.AccountTrigger: line 32, column 1 12:08:31.765 (43104659042)|FATAL_ERROR|System.LimitException: Apex CPU time limit exceeded

AccountTriggerHandler
 public void calculateDistance(List<Account> TriggerNew,Map<Id,Account> TriggerOldMap,boolean isInsert,boolean isUpdate){
        Set<Id> accIdSet = new Set<Id>();
           
        for(Account acc : TriggerNew){
            if(isInsert){
                if(acc.OCR_Pharmacy_Name__c !=null && (acc.BillingStreet!=null || acc.BillingPostalCode!=null || acc.BillingCity!=null || acc.BillingSt                 ate!=null || acc.BillingCountry!=null)){
line 572, column 1   accIdSet.add(acc.Id);               
                }
            }
 
AccountTrigger: 
if(Trigger.isAfter)
        {
            //if(Trigger.new.size()<80){
                if(Trigger.isInsert){
                    newHandler.calculateDistance(Trigger.new,null,true,false);
                }
                if(Trigger.isUpdate){
line 32, column 1  newHandler.calculateDistance(Trigger.new,Trigger.oldMap,false,true);
                    
                    // new handler here 9/7/2016 contact owner trigger
                   
                    UpdateContactHandler updateContactHandler = new UpdateContactHandler();
                    updateContactHandler.changeContactOwner(Trigger.oldMap, Trigger.newMap);
                }
            //}
                     
        }          
Hi,

I need to add or || condition by adding this account record types.In this code i have marked as Bold there i have to add this two Account Record Type  can anyone please help me out for this.
  • 'LTC Customer Facility'
  • 'LTC Former Facility'

  if(!ocrIdSet.isEmpty()){
            List<OCR_Pharmacy__c> ocrAccList = [
                Select Id,Address__c
                     , City__c
                     , State_Province__c
                     , Zip_Postal_Code__c
                     , Country__c
                     , (Select Id
                             , Distance_to_Service_Facility__c 
                          from Accounts__r
                         where (RecordType.Name = 'LTC Prospect Facility'
                                        
                                
                         ) 
                           
                       )
                  from OCR_Pharmacy__c where Id IN : ocrIdSet
            ];

Thanks,
sai charan
Hello All,

I done the security scanning yesterday i got this issues in some classes.i have mentioned one classes below.please can anybody help me for this.

Query: FLS Update

Object: current_week_severe__c in file: /classes/AccountTriggerHandler.cls
L 209: newAccount.Current_Week_Severe__c = mapOfAccountAndSevereCurrentCount.get(newAccount.Id);
Object: add in file: /classes/AccountTriggerHandler.cls
L 262: listOfAccountsToUpdate.add(newAccount);
Object: listofaccountstoupdate in file: /classes/AccountTriggerHandler.cls
L 265: if(isUpdateAccounts && (listOfAccountsToUpdate!=null && !listOfAccountsToUpdate.isEmpty() && listOfAccountsToUpdate.size()>0)){
Object: listofaccountstoupdate in file: /classes/AccountTriggerHandler.cls
L 268: update listOfAccountsToUpdate;
Hello All,
I need help regarding this issue,

Yesterday i have done code scanning using force.com security source scanner.i got an issue stating that DML statements inside the Loops

DML Statements Inside Loops result path 1:

Object: insert in file: triggers\chatter_answers_question_escalation_to_case_trigger.trigger

L 7: insert newCase;


How i have to figure it out this issue.

Thanks,
sai charan
 
Hello,
Please help me for this issue.i want to create a button called word doc.So when the user clicks on the button it should render as word,it should open in a new word doc.

please send the code for controller and vf page so i can add in my code.

Thanks,
sai charan
Hello All,

I dont know why this error pop up is comming.can any body please help for this when i am trying to save i am getting this error.
system.security.NoAccessException: Update access denied for Account, controller action methods may not execute
.
 
Hello All,
I need to create a custom Button called (export pdf).i have a vf page and class i need to add this action button in vf page(summary page).when we click on summary page  a pdf button should populate and when we click export pdf button it should generate the summary page as pdf.I need to code can any one help me out for this and if any body can do this i will send my code vf page and class.

Thanks,
charan
Hello Team,

IF(ISPICKVAL(Status__c, 'Completed'),IMAGE("/servlet/servlet.FileDownload?file=015S0000000dYFi", "Green", 9, 15)&"Completed",

I have used the above formula to populate the colour image for the field.But the strange thing is it is showning the  colour image for me, but when i logged into user profile and check on the field it is not populating/showing the image.

My profile is system admin and the user have different profile can any body please help/suggest me on this to show this colour image for the user profile.


Thanks!!
 
Hello All,

Can any one helpme on this Functionality

I have a 5 Checkboxes 
Completed_FieldActivation__c
Completed_FieldActivation1__c
Completed_FieldActivation2__c
Completed_FieldActivation3__c
Completed_FieldActivation4__c

And a there is One Status__c picklist Field,In that Picklist Value is "Completed".        
And RecordType.id = '012S00000000mUU'
I have to write a validation rule to to Mandate all the checkboxes must be checked when they change the status picklist Field to "Completed"

Error Message: All check boxes must be clicked in order to allow the Task Status to be “Complete”
OCRtrigger:
trigger OCRtrigger on OCR_Pharmacy__c (after update) {

    OCRTriggerHandler handler = new OCRTriggerHandler();
    
    handler.UpdateAccountOnAddressChange(trigger.new,Trigger.OldMap)

Trigger Handler: 
public class OCRTriggerHandler{

    public void UpdateAccountOnAddressChange(List<OCR_Pharmacy__c> OCRList, Map<Id,OCR_Pharmacy__c> TriggerOldMap){
    
        Set<Id> ocrIdSet = new Set<Id>();
        List<Account> accountToUpdateList = new List<Account>();
    
        for(OCR_Pharmacy__c OCR : OCRList){
            if((OCR.Address__c != TriggerOldMap.get(OCR.id).Address__c || OCR.City__c!= TriggerOldMap.get(OCR.id).City__c|| 
            OCR.State_Province__c != TriggerOldMap.get(OCR.id).State_Province__c ||
            OCR.Zip_Postal_Code__c != TriggerOldMap.get(OCR.id).Zip_Postal_Code__c || 
            OCR.Country__c!= TriggerOldMap.get(OCR.id).Country__c) && OCR.Status__c != 'Inactive'){
                ocrIdSet.add(OCR.Id);
            }
        }
        
        if(!ocrIdSet.isEmpty()){
            List<OCR_Pharmacy__c> ocrAccList = [
                Select Id,Address__c
                     , City__c
                     , State_Province__c
                     , Zip_Postal_Code__c
                     , Country__c
                     , (Select Id
                             , Distance_to_Service_Facility__c 
                          from Accounts__r
                         where (RecordType.Name = 'LTC Prospect Facility'
                         OR
                         RecordType.Name='LTC Customer Facility'
                         OR
                         RecordType.Name='LTC Former Facility'       
                         ) 
                           
                       )
                  from OCR_Pharmacy__c where Id IN : ocrIdSet
            ];
            
            
            for(OCR_Pharmacy__c OCR : ocrAccList){
                //system.assert(false, '(OCR.Accounts__r.size()' + OCR.Accounts__r.size());
                if(OCR.Accounts__r.size()>0){
                    for(Account acc : OCR.Accounts__r){
                        if(acc.Distance_to_Service_Facility__c <= 0 || String.isBlank(String.valueOf(acc.Distance_to_Service_Facility__c))) {
                            if(Schema.SObjectType.Account.fields.Distance_to_Service_Facility__c.isUpdateable() && Schema.SObjectType.Account.fields.Override_Calculate_Miles__c.isUpdateable()){
                                acc.Distance_to_Service_Facility__c = NULL;
                                acc.Override_Calculate_Miles__c = false;
                                accountToUpdateList.add(acc);
                            }
                            
                        }
                    }
                }    
            }
            if(!accountToUpdateList.isEmpty() && Schema.SObjectType.Account.isUpdateable()){
                update accountToUpdateList ;
            }
        }
        
    }

}
Hi,

I need to add or || condition by adding this account record types.In this code i have marked as Bold there i have to add this two Account Record Type  can anyone please help me out for this.
  • 'LTC Customer Facility'
  • 'LTC Former Facility'

  if(!ocrIdSet.isEmpty()){
            List<OCR_Pharmacy__c> ocrAccList = [
                Select Id,Address__c
                     , City__c
                     , State_Province__c
                     , Zip_Postal_Code__c
                     , Country__c
                     , (Select Id
                             , Distance_to_Service_Facility__c 
                          from Accounts__r
                         where (RecordType.Name = 'LTC Prospect Facility'
                                        
                                
                         ) 
                           
                       )
                  from OCR_Pharmacy__c where Id IN : ocrIdSet
            ];

Thanks,
sai charan
Hello All,

I done the security scanning yesterday i got this issues in some classes.i have mentioned one classes below.please can anybody help me for this.

Query: FLS Update

Object: current_week_severe__c in file: /classes/AccountTriggerHandler.cls
L 209: newAccount.Current_Week_Severe__c = mapOfAccountAndSevereCurrentCount.get(newAccount.Id);
Object: add in file: /classes/AccountTriggerHandler.cls
L 262: listOfAccountsToUpdate.add(newAccount);
Object: listofaccountstoupdate in file: /classes/AccountTriggerHandler.cls
L 265: if(isUpdateAccounts && (listOfAccountsToUpdate!=null && !listOfAccountsToUpdate.isEmpty() && listOfAccountsToUpdate.size()>0)){
Object: listofaccountstoupdate in file: /classes/AccountTriggerHandler.cls
L 268: update listOfAccountsToUpdate;
Hello All,
I need help regarding this issue,

Yesterday i have done code scanning using force.com security source scanner.i got an issue stating that DML statements inside the Loops

DML Statements Inside Loops result path 1:

Object: insert in file: triggers\chatter_answers_question_escalation_to_case_trigger.trigger

L 7: insert newCase;


How i have to figure it out this issue.

Thanks,
sai charan
 
Hello All,
I need to create a custom Button called (export pdf).i have a vf page and class i need to add this action button in vf page(summary page).when we click on summary page  a pdf button should populate and when we click export pdf button it should generate the summary page as pdf.I need to code can any one help me out for this and if any body can do this i will send my code vf page and class.

Thanks,
charan