• Mohamed Ithris
  • NEWBIE
  • 30 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 12
    Replies
Hi ,
How to Replace old picklist value to new picklist values.
It's throwing an error when i'm replacing new picklist value.
EX : "abc" old picklist value
I'm replacing bcd instead of "abc".
Error: The picklist value "bcd" that you're trying to replace doesn't exist for this picklist.

Thanks
KmK
  • March 14, 2019
  • Like
  • 0
Hello Guys,

My organization going to Migrate From Classic to Lightning.What is Salesforce recommentaion is it Aura or LWC?

I hope both we can able to achieve our requirenment.

Is there any document from salesforce side regarding this?

Thanks
Mohamed Ithris
HI Experts,

Can anyone help me out, how can i send an email to public group users under a queue based on language. Thanks in advance

Hello, Hope everybody is having a good day 

This is my first Dev task ever..

need to basically

1-Deactivate current CCP users, make new users with the same credentials (IsActive = False, IsPortalEnabled = False, Append a suffix to unique fields (username, federationid, etc) 

2-Create new user record with proper license and same user details as on original record and link to original Contact (while making sure no email communication is sent to customer)

3-Move password from original record to newly created user record 

the logic is easy, but considering it is my first Dev task.. some help would be Greatly Appreciated !

I am using lightning-spinner and normally we get the DOT as spinner. 

But my requirement is, i need to have my TEXT to loaded instead of the DOTs untill my data loaded on the page. Your help would be really appreciated.

Thanks & Regards
Ravi

 

A table in componentName.html
 
<table style="border-collapse: collapse; width: 100%;">
                                <tr>
                                    <td style="border: 1px solid grey; text-align: left; padding: 8px;">
                                        <input type="radio" id="Phone" name="verificationMethod" value={phone} onchange={selectMethod}/>
                                        <label class="slds-text-heading_small">&nbsp;{phone}</label>
                                    </td>
                                </tr>
                            </table>

componentName.js
 
selectMethod(event){
        this.selectedMethod = event.target.id;
    }

When the select method executes, the value of selectedMethod property becomes Phone-57 instead of Phone.

So I changed the function to 
 
selectMethod(event){
        this.selectedMethod = event.target.id.replace('-57','');
    }

Can anyone please tell why this is happening.
Hey Gurus,

I am newbiew to Triggers. 

Scenerio  - There is a checkbox field on a Account called "Account Visited"? Now if the parent account gets visited, its same as visiting all of its child accounts. 

So I need a trigger if someone checked the box on the Parent account, all of its child accounts gets checked as well and sales rep dont have to go to every child account individually to update.

Cheers
Hello, My test class is only covering 70% of my class. How can I get it to cover 100%?

Here is the Class:
public class CBOHandler {
    public static void onAfterUpdate(List<CBO__c> CBOList, Map<Id, CBO__c> oldCBOMap) {

        for (CBO__c cbo : CBOList){
            if(oldCBOMap.get(cbo.Id).Pending_for_5_min__c == false && cbo.pending_for_5_min__c == true){
                         Set<string> cboSet = new Set<string>();
                            cboSet.add(cbo.id);
                            List<Discharge__c> disList = [select id,Referrals_Status__c from discharge__c where id in (select discharge_name__c from cbo__c where id in :cboset )];
                for (Discharge__c dis : disList){
                    if (dis.Referrals_Status__c != 'Pending Outcome'){
                        dis.Referrals_Status__c = 'Pending Outcome';
                    }
                     update disList;
                }
               
            }
            
        }
            
        
}
}


This portion is not being covered by the test:
                    if (dis.Referrals_Status__c != 'Pending Outcome'){
                        dis.Referrals_Status__c = 'Pending Outcome';
                    }
                     update disList;
                }



Here is the Test:
@isTest
public class CBOHandlerTest {
@isTest
    Static Void CboHandlerTestMethod(){
            Discharge__c d = new Discharge__c();
            d.Name = 'Test';
            d.Referrals_Status__c='Documents Uploaded';
                insert d;
        
        Cbo__c c = new Cbo__c();
        c.Pending_for_5_min__c = false;
        insert c;
        
         c = [SELECT Id, name FROM CBO__c WHERE Id =:c.Id];
        c.Pending_for_5_min__c = true;
        update c;
        system.debug(d.Referrals_Status__c);
    }
}
Hi , 

can you please suggest the best way to validate Salesforce live Agent pre caht form with case record.

Ex : case email id = abc@bac.com(Salesforce record)
From pre chat from if user is not enterd email as abc@abc.com i want show an error.
  
I have question about two governor limits;
1. CPU time
2. Heap Size

Looking at some of the testing failing arbitrory, we came to following conclusion:
1. CPU time limit is enforced asynchronous way. That means some times the apex code will terminate at ~11k msec and sometimes ~15k. Thus some tests may pass although it took more than 10k msec, just because the limit-watcher didnt catch the violoation.

However, for Heapsize limit - we were expecting this to be very hard and would always be enforced synchronously. However recently we observed that one job which was failing for heapsize in one batch, didnt fail. the only small change we had, that we added more debug data to the log objects we created (!!) 
We would like to know if this is not the case. 

If the limits are not enforced very strictly, sometimes apex code completes successfully and sometimes it doesnt.



 
Hi ,
How to Replace old picklist value to new picklist values.
It's throwing an error when i'm replacing new picklist value.
EX : "abc" old picklist value
I'm replacing bcd instead of "abc".
Error: The picklist value "bcd" that you're trying to replace doesn't exist for this picklist.

Thanks
KmK
  • March 14, 2019
  • Like
  • 0
Geeting error at winter 19 Platfrom Developer 1 maintenance Certification:

Challenge not yet complete in My Trailhead Playground 1
Ensure sharing rules from the calling class are enforced for the the 'UtilityClass' Apex class.

Can you please help?