• VARALAXMI JANGAY
  • NEWBIE
  • 20 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 2
    Replies
Hi,

In my org, on account page "NEW" button is hidden and I am not able to create any record. Can anyone help me with this issue.
User-added image

Thanks and regards,
Varalaxmi Jangay
Hello,
Is there a way in Salesforce to configure that user cannot use his/her password same as his/her username or first name or last name? So for example, if my name is Jangay Varalaxmi and username is jangayvaralaxmi@gmail.com, then I want to setup/configure something that prevents me from using jangay21, jangay or varajangay as my password and it should not include special character "!". I have looked at various blogs and website but did not find any solution.

Thank you very much in advance.
Hi,
Below is the error in Step 6,
 There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject

My Process builder is as follows:

Object: Fulfillment

Entry Criteria: [Fulfillment__c].Status__c = Cancelled AND [Fulfillment__c].Schedule_Date__c > TODAY()

Immediate Actions: 
Based on [Fulfillment__c].Opportunity.OpportunityLineItems


Field Update Filter condition : 
Line Item ID  equals Formula [FullFillment__c].AdventurePackageId__c

Field to Update :
Sales Price equal to [Fulfillment__c].Deposit__c

The Explorer__c field was set to "Required" and "What to do if the lookup record is deleted?" was set to "Don't allow deletion of the lookup record that's part of a lookup relationship.". I updated the "Required" to false and changed "What to do if the lookup record is deleted?" to "Clear the value of this field. You can't choose this option if you make this field required."
I have unrequired the Explorer__c field on the layout too.

Below are my screenshorts:
User-added imageUser-added image

Please suggest me the solution.

Thanks,
Varalaxmi.
Hi,
Blow screenShot  is the error I am getting completing the Workflow Migration Rule badge
User-added image
Please someone help me to resolve this issue.

Thanks,
Varalaxmi
 
Hi,

Below is the code of custom Setting Data with the sorting the values in the pageBlockTable,
Sort order is not working, Below is my code.
Please can anyone help me,

<apex:page controller="CustomSettingsCon">
    <apex:form>
        <apex:pageBlock id="pageBlock">
             <apex:pageBlockButtons location="top">
      <apex:commandButton value="View" action="{!ViewData}" id="theButton" rerender="pageBlock"></apex:commandButton>
    </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!codes}" var="c" rendered="{!NOT(ISNULL(codes))}" >
             <apex:column >
         <apex:facet name="header">   
           <apex:commandLink action="{!ViewData}" value="Name{!IF(sortExpression=='name',IF(sortDirection='ASC','▼','▲'),'')}" id="cmdSort">
             <apex:param value="name" name="column" assignTo="{!sortExpression}" ></apex:param>
           </apex:commandLink>
         </apex:facet>
                <apex:outputLink value="/{!c.Id}" target="_blank">{!c.Name}</apex:outputLink>
       </apex:column>
             <apex:column value="{!c.Phone_Number__c}">
         <apex:facet name="header">
           <apex:commandLink action="{!ViewData}" value="Phone_Number__c{!IF(sortExpression=='Phone_Number__c',IF(sortDirection='ASC','▼','▲'),'')}">
             <apex:param value="Phone_Number" name="column" assignTo="{!sortExpression}" ></apex:param>
           </apex:commandLink>
         </apex:facet>
       </apex:column>
               <apex:column value="{!c.Address__c}">
          <apex:facet name="header">
           <apex:commandLink action="{!ViewData}" value="Address__c{!IF(sortExpression=='Address__c',IF(sortDirection='ASC','▼','▲'),'')}">
             <apex:param value="Address" name="column" assignTo="{!sortExpression}" ></apex:param>
           </apex:commandLink>
         </apex:facet>
       </apex:column>
                 <apex:column value="{!c.Email__c}">
          <apex:facet name="header">
           <apex:commandLink action="{!ViewData}" value="Email__c{!IF(sortExpression=='Email__c',IF(sortDirection='ASC','▼','▲'),'')}">
             <apex:param value="Email__c" name="column" assignTo="{!sortExpression}" ></apex:param>
           </apex:commandLink>
         </apex:facet>
       </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>
===============
public class CustomSettingsCon {
    public List<Account__c> codes{get;set;}
        private String sortDirection = 'ASC';
   private String sortExp = 'name';
   
    public String sortExpression{
   
     get
     {
        return sortExp;
     }
     set
     {
       //if the column is clicked on then switch between Ascending and Descending modes
       if (value == sortExp)
         sortDirection = (sortDirection == 'ASC')? 'DESC' : 'ASC';
       else
         sortDirection = 'ASC';
       sortExp = value;
     }
   }
    
    public String getSortDirection()
 {
    //if not column is selected
    if (sortExpression == null || sortExpression == '')
      return 'ASC';
    else
     return sortDirection;
 }
    
    public void setSortDirection(String value){
   
   sortDirection = value;
 }
 
   public List<Account__c> getcodes(){
       return codes;
   }

    
    public void ViewData(){
           string sortFullExp = sortExpression  + ' ' + sortDirection;
        
       Map<String,Account__c> allcodes = Account__c.getAll();
       codes = allCodes.values();  
    }
}

Thanks,
Varalaxmi
Hi,
Below is my code for test class in Super badge, Code coverage is 100% but its fail to chech the challenge.
Its showing the error as:System.LimitException: Too many DML rows: 10001.
Kindly, please someone help me.

@IsTest
public class MaintenanceRequestTest {
    
   @isTest static void testBulkScenario(){
    List<Case> bulkcase = new List<Case>();
    List<Product2> bulkpro = new List<Product2>();
    List<Vehicle__c> bulkVehicle = new List<Vehicle__c>();
    List<Work_Part__c> bulkParts = new  List<Work_Part__c>();
    
   for(integer i=0; i<300; i++){
    bulkpro.add(new Product2(Name ='Test Product-'+i,Cost__c=(i*5)+100,    Current_Inventory__c=199,
                             Lifespan_Months__c=10,Maintenance_Cycle__c=7,Replacement_Part__c=True,
                            Warehouse_SKU__c = '99999*i'));
      bulkVehicle.add(new Vehicle__c(Name='Test Vehicle'+i));
                                    
    }
       insert bulkpro;
       insert bulkVehicle;
       
       for(Integer i=0;i<300;i++){
       bulkcase.add(new Case(Date_Due__c=Date.today(),Date_Reported__c=date.today(),
                                Status='New', Type ='Routine Maintenance',Subject ='Test Case',
                            origin='Web', Equipment__c=bulkpro[i].Id, Vehicle__c = bulkVehicle[i].Id));
       }
       insert  bulkcase;
       
       integer Counter =0;
       for(Case tcase:bulkCase){
           if(Counter/2==0){
                Work_Part__c workPart = new Work_Part__c(Maintenance_Request__c=tCase.Id,
                                                         Equipment__c=bulkpro[counter].Id);
               bulkParts.add(workPart);
           }   
           counter++;
         
       }
            insert bulkParts;  
       for(Case tcase:bulkcase){
         tcase.Status='Closed';
           
       }
       Update bulkcase;
       
       System.assertEquals(300, [Select id from Case where Type='Routine Maintenance' and Status!='Closed' and Vehicle__c in :bulkVehicle].size());
          System.assertEquals(0, [Select id from Case where Type='Repair' and Status!='Closed' and Vehicle__c in :bulkVehicle].size());
       
   }
}
Hi,
I have a below code, I am getting a null values rather than getting a mail to the mailId mentioned in the code.
Here is my Code:
Code
------------------------------------------------------------------

trigger SHiftmangment on Shift_Management__c (before insert, after insert) {
    List < Messaging.SingleEmailMessage > mailList = new List < Messaging.SingleEmailMessage > ();
    list<Shift_Management__c> sm = [select id,Contact__c,From_Date__c,To_Date__c,Shift__C,contact__r.Email from Shift_Management__c];
    for(Shift_Management__c c : trigger.new){
    

    
        for(Shift_Management__c sf : sm){
            
                Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
                message.setTemplateId('00X6F000001BxUA');
                message.setTargetObjectId(c.contact__c);
                List<String> toAddresses = new List<String>();
                toAddresses.add(sf.contact__r.Email);
                message.setToAddresses(toAddresses);
                mailList.add(message);
               // Messaging.sendEmail(new Messaging.Email[] {message});
            if(c.Contact__c == sf.Contact__c && c.From_Date__c == sf.From_Date__c && c.Shift__c == sf.Shift__c){
                
                c.Contact__c.addError('Shift already assgined with this date');  
                c.Shift__c.addError('Shift already assgined');
                c.From_Date__c.addError('Shift already assgined with this date');
            }
            else if((c.From_Date__c >=sf.From_Date__c && c.From_Date__c <=sf.To_Date__c) && c.Contact__c == sf.Contact__c){
                c.addError('Shift already assgined with in this date');
            }
            
        }
    }
    Messaging.sendEmail(mailList);
}

Please can anyone help me to solve that problem.

Thanks,
Varalaxmi
Hi,
When Solving the Trailhead, i am getting the below error: 
An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.
    
Here r my screen Shorts

User-added image

User-added image

User-added image

User-added image

Please can anyone help me to solve this issue
Hi,
I am getting the below error while solving the Trailhead module.
I have set a condition to AND.
Please, can anyone help me to solve this problem

User-added image

User-added image

User-added image

User-added image
Hi,
I have a below code, I am getting a null values rather than getting a mail to the mailId mentioned in the code.
Here is my Code:
Code
------------------------------------------------------------------

trigger SHiftmangment on Shift_Management__c (before insert, after insert) {
    List < Messaging.SingleEmailMessage > mailList = new List < Messaging.SingleEmailMessage > ();
    list<Shift_Management__c> sm = [select id,Contact__c,From_Date__c,To_Date__c,Shift__C,contact__r.Email from Shift_Management__c];
    for(Shift_Management__c c : trigger.new){
    

    
        for(Shift_Management__c sf : sm){
            
                Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
                message.setTemplateId('00X6F000001BxUA');
                message.setTargetObjectId(c.contact__c);
                List<String> toAddresses = new List<String>();
                toAddresses.add(sf.contact__r.Email);
                message.setToAddresses(toAddresses);
                mailList.add(message);
               // Messaging.sendEmail(new Messaging.Email[] {message});
            if(c.Contact__c == sf.Contact__c && c.From_Date__c == sf.From_Date__c && c.Shift__c == sf.Shift__c){
                
                c.Contact__c.addError('Shift already assgined with this date');  
                c.Shift__c.addError('Shift already assgined');
                c.From_Date__c.addError('Shift already assgined with this date');
            }
            else if((c.From_Date__c >=sf.From_Date__c && c.From_Date__c <=sf.To_Date__c) && c.Contact__c == sf.Contact__c){
                c.addError('Shift already assgined with in this date');
            }
            
        }
    }
    Messaging.sendEmail(mailList);
}

Please can anyone help me to solve that problem.

Thanks,
Varalaxmi
Hi,
I am getting the below error while solving the Trailhead module.
I have set a condition to AND.
Please, can anyone help me to solve this problem

User-added image

User-added image

User-added image

User-added image