• MOHAMMED AL IMAM
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 10
    Replies
How to this solve this issue?
Im referring this link
 
http://keith-wood.name/calendars.html
 


How to solve this issue?

Im referring below link
 
http://keith-wood.name/calendars.html
In homepage it is loading and after refreshing also,But in record paage ,it is  not loading after refreshing,How to solve is this issue?
I need a aura component for convert Indian time to est time using momentum js (static resource).
<!doctype html>
  <head>
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  </head>
  <body onload="initWork()" >
    <div class="jumbotron text-center container mt-5 mb-5">
      <div class="row mt-3 mb-3 text-center">
        <div class="col-6">
          <input type="text" id="datepicker">
        </div>
        <div class="col-6">
          <label for="datepicker">:التاريخ/date</label>
        </div>
      </div>
      <span>Today is: </span><span id="today"></span>
    </div>
    <div class="text-center">
      <p>&copy 2019 @Hussam <a href="https://github.com/sam-          shudukhi/Hijri_Calendar">github</a></p>
    </div>
  </body>
</html>



var currDate = '';
function initWork() {
        //Today
        var todayElement = document.getElementById("today");
        todayElement.innerHTML = HijriJS.today().toString();
    // get today's date in Hijri
    currDate = HijriJS.today().toString();
    // to remove H from yearH ex: 1440H, drop the last character to be 1440
    currDate = currDate.substring(0, currDate.length - 1);
    // reformat date from dd/mm/yyyy to dd-mm-yyyy
    currDate = currDate.split('/').join('-');
    // set the date input field to currDate so, datepicker sets it as the current date automatically
    $('#datepicker').val(currDate);
}

$( function() {
   $( "#datepicker" ).datepicker({
     changeMonth: true, // show months menu
     changeYear: true, // show years menu
     dayNamesMin: [ "س", "ج", "خ", "ر", "ث", "ن", "ح" ], // arabic days names
     dateFormat: "dd-mm-yy", // set format to dd-mm-yyyy
     monthNames: [ "محرم", "صفر", "ربيع الأول", "ربيع الثاني", "جمادى الأول", "جمادى الثاني", "رجب", "شعبان", "رمضان", "شوال", "ذو القعدة", "ذو الحجة" ],
     yearRange: "c-0:c+15", // year range in Hijri from current year and +15 years
     monthNamesShort: [ "محرم", "صفر", "ربيع ١", "ربيع ٢", "جمادى ١", "جمادى ٢", "رجب", "شعبان", "رمضان", "شوال", "ذو القعدة", "ذو الحجة" ],
      showAnim: 'bounce'
     });
});
 
I need a date picker when i selects that it should show Hijiri calendar
If We Select Hijiri Date Automatically English Date to be Convert
Vice Versa If we select the English Date Hijri date should update.
so basically in that component i need two date field one English date and other one Arabic Date.

Provide the code for the above requirement
 
I Just tried giving validation rules DATEVALUE(Order_Date__c) <= TODAY() .
Getting an error,How to reslove this?

 

Change the below code trigger to helper class and provide test class also
trigger campaigntrigger on CampaignMember (after insert) { Map<id,List<opportunity>> map1 = new Map<id,List<opportunity>>(); set<id> conSet =new set<id>(); for(CampaignMember c :trigger.new ){ conSet.add(c.contactId); } for(opportunity cm: [select id,contactId,Name,StageName from opportunity where contactid in: conSet]){ List<opportunity> oppList; if(!map1.containsKey(cm.contactId)){ oppList = new List<opportunity> (); oppList.add(cm); map1.put(cm.contactId, oppList); } else{ oppList = map1.get(cm.contactId); oppList.add(cm); map1.put(cm.contactId,oppList); } } List<Opportunity> oppsToUpdate = new List<Opportunity>(); for(CampaignMember cm : trigger.new){ if(cm.ContactId != NULL){ if(map1.get(cm.ContactId) != NULL){ for(Opportunity op : map1.get(cm.ContactId)){ op.CampaignId = cm.CampaignId; oppsToUpdate.add(op); } } } } if(oppsToUpdate.size() > 0){ update oppsToUpdate; } }
 
RSMs should only see accounts that belong to their AE
Here RSM is the user  wants to see AE user account ,while login as RSM.

How to give permission access ?
1,  I have Account Executive user and profile
·         Each Account Executieve should only see accounts that are in his or her territory ?  
2,·    I have regional sales manager user profile   
  RSMs should only see accounts that belong to their AEs ?
 
how to do this ? I need  to give permission
I can't see salesforce in my gmail account after adding the salesforce extension I have enabled all settings in all salesforce for this.Please help me to solve this
trigger campaigntrigger on CampaignMember (after insert) { Map<id,List<opportunity>> map1 = new Map<id,List<opportunity>>(); set<id> conSet =new set<id>(); for(CampaignMember c :trigger.new ){ conSet.add(c.contactId); } for(opportunity cm: [select id,contactId,Name,StageName from opportunity where contactid in: conSet]){ List<opportunity> oppList; if(!map1.containsKey(cm.contactId)){ oppList = new List<opportunity> (); oppList.add(cm); map1.put(cm.contactId, oppList); system.debug('success' +map1); } else{ oppList = map1.get(cm.contactId); oppList.add(cm); map1.put(cm.contactId,oppList); system.debug('fail' +map1); } } List<Opportunity> oppsToUpdate = new List<Opportunity>(); for(CampaignMember cm : trigger.new){ if(cm.ContactId != NULL){ if(map1.get(cm.ContactId) != NULL){ for(Opportunity op : map1.get(cm.ContactId)){ op.CampaignId = cm.CampaignId; oppsToUpdate.add(op); } } } } if(oppsToUpdate.size() > 0){ update oppsToUpdate; } }
In this code:

trigger  campaigntrigger  on CampaignMember (after insert) {
      
        
        Map<id,List<opportunity>>   map1 = new     Map<id,List<opportunity>>(); 
        List<CampaignMember> newMembersList = trigger.new;
        set<id> conSet =new set<id>();
        for(CampaignMember c :newMembersList ){
            conSet.add(c.contactId);
        }
        List<opportunity> oppList = [select id,contactId,Name,StageName from opportunity where contactid in: conSet];
        for(opportunity  cm: oppList)    
        {     if(!map1.containsKey(cm.contactId)){
                   
                List<opportunity> conLi = new List<opportunity> ();
                conLi.add(cm);
                map1.put(cm.contactId, conLi);
           
            } 
            else{
                List<opportunity> conL = map1.get(cm.contactId);
                conL.add(cm);
                map1.put(cm.contactId,conL);
                 
            }for(Id i: map1.keyset())    
        {     
        system.debug('Contact id- '+i+' list of Opportunity-  '+map1.get(i));
          }
         
        }
   
          }
 
I need a aura component for convert Indian time to est time using momentum js (static resource).
I Just tried giving validation rules DATEVALUE(Order_Date__c) <= TODAY() .
Getting an error,How to reslove this?

 

Change the below code trigger to helper class and provide test class also
trigger campaigntrigger on CampaignMember (after insert) { Map<id,List<opportunity>> map1 = new Map<id,List<opportunity>>(); set<id> conSet =new set<id>(); for(CampaignMember c :trigger.new ){ conSet.add(c.contactId); } for(opportunity cm: [select id,contactId,Name,StageName from opportunity where contactid in: conSet]){ List<opportunity> oppList; if(!map1.containsKey(cm.contactId)){ oppList = new List<opportunity> (); oppList.add(cm); map1.put(cm.contactId, oppList); } else{ oppList = map1.get(cm.contactId); oppList.add(cm); map1.put(cm.contactId,oppList); } } List<Opportunity> oppsToUpdate = new List<Opportunity>(); for(CampaignMember cm : trigger.new){ if(cm.ContactId != NULL){ if(map1.get(cm.ContactId) != NULL){ for(Opportunity op : map1.get(cm.ContactId)){ op.CampaignId = cm.CampaignId; oppsToUpdate.add(op); } } } } if(oppsToUpdate.size() > 0){ update oppsToUpdate; } }
 
In this code:

trigger  campaigntrigger  on CampaignMember (after insert) {
      
        
        Map<id,List<opportunity>>   map1 = new     Map<id,List<opportunity>>(); 
        List<CampaignMember> newMembersList = trigger.new;
        set<id> conSet =new set<id>();
        for(CampaignMember c :newMembersList ){
            conSet.add(c.contactId);
        }
        List<opportunity> oppList = [select id,contactId,Name,StageName from opportunity where contactid in: conSet];
        for(opportunity  cm: oppList)    
        {     if(!map1.containsKey(cm.contactId)){
                   
                List<opportunity> conLi = new List<opportunity> ();
                conLi.add(cm);
                map1.put(cm.contactId, conLi);
           
            } 
            else{
                List<opportunity> conL = map1.get(cm.contactId);
                conL.add(cm);
                map1.put(cm.contactId,conL);
                 
            }for(Id i: map1.keyset())    
        {     
        system.debug('Contact id- '+i+' list of Opportunity-  '+map1.get(i));
          }
         
        }
   
          }