• atharva Vispute 3
  • NEWBIE
  • 30 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 38
    Replies
hi,


calculator.js:3,4 : LWC1503: Parsing error: Unexpected token (3:4): Source
Thanks!!
Hi,
I have created calculator in LWC. I want to check previous operations in calculator. How can I do this in LWC?
below is the image of calculator.
Thanks!!
User-added image
Hi,
how to add metadata on object and fields??

Thanks!!
Hi,

 Create an apex trigger on Resource to make sure that It does not exceeds Project assignment limit as per Defined on Project types. 
·         If Project.Type == Hot than max 4 Resources Allowed to be created under that project 
·         If Project.Type == Warm than max 2 Resources Allowed to be created under that project 
·         If Project.Type == Cold than max 1 Resource is Allowed to be created under that project 
  
Example: Consider there is project named “TUV” with Type as “Warm” than system should only allow max 2 resources to be relate to TUV Project, if User tries to related more than 2 resources than System should Throw error that “Project Assignment Limit Reached” .
Plzz help me to find this solution in trigger. 

Thanks!!
Hi,

problem statement is
in currency if the amount is in  10,000-20,000 then picklist value must be cold, if amount is in 20,000-50,000 then picklist value must be hot and if the amount is more than 50,000 then value should be warm. So what kind of trigger i have to use here?? Plzz help me to find solution.

Thanks!!


 
Hi,

problem statement is
in currency if the amount is in  10,000-20,000 then picklist value must be cold, if amount is in 20,000-50,000 then picklist value must be hot and if the amount is more than 50,000 then value should be warm. So what kind of trigger i have to use here?? Plzz help me to find solution.

Thanks!!
trigger TaskTimeCalculation on Task_Tracker__c (before insert,before update) {
    
    //if(Trigger.isinsert && Trigger.isbefore)
   
    for (Task_Tracker__c t:Trigger.new){
        if(t.Status__c=='New')
            t.TaskOpened__c =system.now();
        
    }
  
    if(Trigger.isupdate && Trigger.isbefore){
        for(Task_Tracker__c ts:Trigger.new){
        
        Task_Tracker__c oldtask= Trigger.oldmap.get(ts.id);
            
            if(ts.Status__c=='New' && oldtask.Status__c!='new'){
                ts.TaskOpened__c=system.now();
            }
            
            if(ts.Status__c=='Completed' && oldtask.Status__c!='Completed' && ts.TaskOpened__c!=null ){
                
                
             ts.Actual_Time__c=(system.now().getTime()-ts.TaskOpened__c.getTime()/(1000*60*60));
                
            }
            }
    } 

}


I am gertting error last line..
Illegal assignment from Long to Datetime 
this is the error i am getting.. please help me to solve this querry.. and plzz provide me correct code

Thank you!!
can user hide opportunity and contacts in account?? if yes then user is able to see other activiteis like task,events?? or it also not visible??
trigger TaskTimeCalculation on Task (before insert,before update) {
    
    if(Trigger.isinsert && Trigger.isbefore)
    
    for (Task t:Trigger.new){
        if(t.status=='New')
            t.TaskOpened__c =system.now();
    }
    
    if(Trigger.isupdate && Trigger.isbefore){
        for(Task ts:Trigger.new){
        
        Task oldtask= Trigger.oldmap.get(ts.id);
            
            if(ts.Status=='New' && oldtask.Status!='new'){
                ts.TaskOpened__c=system.now();
            }
            
            if(ts.Status=='Completed' && oldtask.Status!='Completed' && ts.TaskOpened__c!=null ){
                
                
             ts.Actual_Time__c=(system.now().getTime()-ts.TaskOpened__c.getTime()) /(1000*60*60);
            }
            }
    }

}

Can anyone explain me this code ??
Hi,

 Create an apex trigger on Resource to make sure that It does not exceeds Project assignment limit as per Defined on Project types. 
·         If Project.Type == Hot than max 4 Resources Allowed to be created under that project 
·         If Project.Type == Warm than max 2 Resources Allowed to be created under that project 
·         If Project.Type == Cold than max 1 Resource is Allowed to be created under that project 
  
Example: Consider there is project named “TUV” with Type as “Warm” than system should only allow max 2 resources to be relate to TUV Project, if User tries to related more than 2 resources than System should Throw error that “Project Assignment Limit Reached” .
Plzz help me to find this solution in trigger. 

Thanks!!
hi,


calculator.js:3,4 : LWC1503: Parsing error: Unexpected token (3:4): Source
Thanks!!
Hi,

 Create an apex trigger on Resource to make sure that It does not exceeds Project assignment limit as per Defined on Project types. 
·         If Project.Type == Hot than max 4 Resources Allowed to be created under that project 
·         If Project.Type == Warm than max 2 Resources Allowed to be created under that project 
·         If Project.Type == Cold than max 1 Resource is Allowed to be created under that project 
  
Example: Consider there is project named “TUV” with Type as “Warm” than system should only allow max 2 resources to be relate to TUV Project, if User tries to related more than 2 resources than System should Throw error that “Project Assignment Limit Reached” .
Plzz help me to find this solution in trigger. 

Thanks!!
Hi,

problem statement is
in currency if the amount is in  10,000-20,000 then picklist value must be cold, if amount is in 20,000-50,000 then picklist value must be hot and if the amount is more than 50,000 then value should be warm. So what kind of trigger i have to use here?? Plzz help me to find solution.

Thanks!!


 
Hi,

problem statement is
in currency if the amount is in  10,000-20,000 then picklist value must be cold, if amount is in 20,000-50,000 then picklist value must be hot and if the amount is more than 50,000 then value should be warm. So what kind of trigger i have to use here?? Plzz help me to find solution.

Thanks!!
trigger TaskTimeCalculation on Task_Tracker__c (before insert,before update) {
    
    //if(Trigger.isinsert && Trigger.isbefore)
   
    for (Task_Tracker__c t:Trigger.new){
        if(t.Status__c=='New')
            t.TaskOpened__c =system.now();
        
    }
  
    if(Trigger.isupdate && Trigger.isbefore){
        for(Task_Tracker__c ts:Trigger.new){
        
        Task_Tracker__c oldtask= Trigger.oldmap.get(ts.id);
            
            if(ts.Status__c=='New' && oldtask.Status__c!='new'){
                ts.TaskOpened__c=system.now();
            }
            
            if(ts.Status__c=='Completed' && oldtask.Status__c!='Completed' && ts.TaskOpened__c!=null ){
                
                
             ts.Actual_Time__c=(system.now().getTime()-ts.TaskOpened__c.getTime()/(1000*60*60));
                
            }
            }
    } 

}


I am gertting error last line..
Illegal assignment from Long to Datetime 
this is the error i am getting.. please help me to solve this querry.. and plzz provide me correct code

Thank you!!