• Lucy Yuan
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies

i need the age of every case status. The retention time for every status.

 

i.e.

Someone changes case status to "status 1" at 2011/01/07 16:00.

He changes case status to "status 2" at 2011/01/07 19:00.

At last he changes case status  again to "status 1" 2011/01/08 16:00

 

At 2011/01/08 17:00 ,  the currect "status 1" age should be 4 hours. "status 2" age should be 21 hours.

 

 

Could please give me some solutions to implement this function `?

 

Thanks

 

Lucy

Shanghai, China     

Hello All,

 

i  need your help. Maybe someone could give me some idea about following question :

 

When i re-distribute the owner of one case.  i can choose "queue" or "user" .

 

My queue are from different countrys . so the queue names  prefix country name.  i.e. chinese queues name are going to be "CN_xxxxx".

 

And the role of user designed prefixed "CN_SalesManager" to idenitfy he from which country.

 

In practice,if changing the ownership of case from whatever queue to queue , user to queue or queue to user , end-user easy to select queue or user from other countries. 

 i.e. instead of selecting a swiss queue the user might select a polish queue. As a result the case would show up in a polish queue. This would disturb polish users. Additionally the swiss queue managers wouldn't see that case any longer.

 

 

So how to avolid those scenario  ??  I  need solutions to restrict the ownership assignment country specific !

 

Hope to hear from you assp!

 

Hi

i need to query business hours base on cases in one SOQL.

 

Maybe i need to get one map<BusinessHour , Case> ? but how to get this kind of map when i get the all cases ? That means i need get business hour of  every case ????

 

Hope to hear from you asap :)

 i need to deploy the translation of picklist value from sandbox to production using change set ? but how to ?

 dose translation supported by change set ?

 i tried to add the language translation component to my outbund change set , there were languages(English , Dutch...) options . but i have  no idea about it.  

Hi

i just meet one question, when i convert the string to integer type. i used the integer.valueof() method . but if string like 'ABCDEF' that can't  do integer conversion but throw System.TypeException.

could i do judgement first first? like if the string parameter s='123'  can do integer conversion, and then i call the integer.valueof(s)

is there any method ??

 

 

 

I'm trying to Upload the trigger below into our production environment and receiving the errors below. Test Coverage for the trigger is 85%. Not sure why I would get the errors below:

 

 

 

trigger ExpenseReportUpdate on Expense__c (before insert) {

Expense__c exp = Trigger.new[0];

date trx_d = exp.date__c;
Integer trx_m = trx_d.month();
Integer trx_y = trx_d.year();
String exname = exp.Employee_First_Name__c + ' ' + exp.Employee_Last_Name__c;
String exname_id;
String expR_id;
date trx_st = trx_d.toStartOfMonth();
date stdate = trx_st.addmonths(1);

    try {
        exname_id = [SELECT id
                    FROM User
                    WHERE name = :exname].id;
        }
        
    catch (QueryException e) {
        exname_id = [SELECT id
                    FROM User
                    WHERE name = 'Force Admin'].id;
        }
          
    try { 
    
        expR_id = [SELECT id
            FROM Expense_Report__c
            WHERE CALENDAR_MONTH(Statement_Date__c) = :trx_m
            AND CALENDAR_YEAR(Statement_Date__c)= :trx_y
            AND Employee__c = :exname_id].id; 
            
        exp.Expense_Report__c = expR_id;
       
        }
                    
    catch (QueryException e) {
            Expense_Report__c newER = new Expense_Report__c(Employee__c = exname_id, Statement_Date__c = stdate);
            insert newER;
            
            exp.Expense_Report__c = newER.id;       
    }
    
}

 

 

ERRORS I GET:

MyProfilePageController.testSave()            Failure Message: "System.QueryException: List has no rows for assignment to SObject", Failure Stack Trace: "Class.MyProfilePageController.testSave: line 78, column 35 External entry point"

"not even referencing this?"

ExpenseReportUpdateTest  Coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

"coverage is 89%?"

Deploy Error Average test coverage across all Apex Classes and Triggers is 66%, at least 75% test coverage is required

"not sure why this is happening"

Hi all.

I'm writing my first trigger on SalesForce.

The goal would be: determine the value of a proposal (Proposal__c) updating its field called Proposal_Value__c (Currency), getting the sum of Item_Value__c(currency) that resides in a Proposal child object.

The trigger should be called inserting, updating or deleting a proposal Line_Item

trigger updateProposal on Proposal_Line__c (after delete, after insert, after update) {

Double proposalValue = Proposal__c.Proposal_Value__c;

List proposalLines =
[SELECT j.Proposal_Line_Value__c FROM Proposal_Child__c j FOR UPDATE];

for (Proposal_Child__c pl: proposalLines) {

proposalValue += pl.Proposal_Line_Value__c;
}
update proposalValue ;
}

I have an error declaring proposalValue (the first variable): Illegal assignment from Schema.SObjectField to Double

I've also checked in the schema explorer that says this variable is of Double type.

 

Thanks for any suggestion.

i need the age of every case status. The retention time for every status.

 

i.e.

Someone changes case status to "status 1" at 2011/01/07 16:00.

He changes case status to "status 2" at 2011/01/07 19:00.

At last he changes case status  again to "status 1" 2011/01/08 16:00

 

At 2011/01/08 17:00 ,  the currect "status 1" age should be 4 hours. "status 2" age should be 21 hours.

 

 

Could please give me some solutions to implement this function `?

 

Thanks

 

Lucy

Shanghai, China     

I need to create a validation rules for a task that will not allow anyone to close the task if the check box "Follow-Up" is checked.  I could not find any examples on the support page for validation rules with an example for this.  Can anyone let me know how I can set this up?

Hi,

 

Please send some simple programs to understand map concept?

 

 

Thanks & Regards:

Hyd

 

 

  • January 06, 2011
  • Like
  • 0

This expression returns TRUE when Status = 60-Escalated.  By why?

 

AND ( RecordTypeId  = "012800000003VEx",    /* Support Case  */
            ISPICKVAL(Level__c, "Level 2"),
            NOT ISCHANGED (Level__c),
            OR ( BEGINS(TEXT(Status),"0"),    
                     BEGINS(TEXT(Status), "1"),  
                     BEGINS(TEXT(Status), "5"),   
                     BEGINS(TEXT(Status), "7")  )  )

   

 

Hi

i need to query business hours base on cases in one SOQL.

 

Maybe i need to get one map<BusinessHour , Case> ? but how to get this kind of map when i get the all cases ? That means i need get business hour of  every case ????

 

Hope to hear from you asap :)

Hi

i just meet one question, when i convert the string to integer type. i used the integer.valueof() method . but if string like 'ABCDEF' that can't  do integer conversion but throw System.TypeException.

could i do judgement first first? like if the string parameter s='123'  can do integer conversion, and then i call the integer.valueof(s)

is there any method ??