+ Start a Discussion
Supriyo Ghosh 5Supriyo Ghosh 5 

Update filed

I have a exsiting Apex class where I want to update a field.
for(Case c: [select id,CaseNumber,Branch_name__c,Account_Name__c,Proposal_Detail__c,Principal_code__c,Policy_Number__c,Creation_Date__c,Document_List__c,Vertical__c,DTF_Creation_Date__c,Effective_date_of_coverage__c,Request_Type__c,Supporting_Document__c 
    FROM Case WHERE (RecordTypeID ='012O00000005BMS' AND DTF_Creation_Date__c=null AND Vertical__c =: trnObj.Vertical__c AND Principal_code__c =: trnObj.Principal_code__c)]) {
            case ics = new case();
            ics.id = c.id;
            ics.DTF_Creation_Date__c = System.today();
In the above code I am updating DTF_Creation_Date__c like that I want to update DTF_No__c.
I want to do like below.
DTF_No__c=Branch Code+DTF_Creation_Date__c.
Problem is DTF No is a numeric field,Branch Code is formula field and DTF creation date is date time filed.
So how to do it.Please help.
Prem Anandh 1Prem Anandh 1
Hi Supriyo, 
Can you make it DTF_No__c field as Text from Numeric?
Supriyo Ghosh 5Supriyo Ghosh 5
ok.let me try this.
Supriyo Ghosh 5Supriyo Ghosh 5
I have done that but date field value is coming as null.
ics.DTF_No2__c = c.Branch_Code__c + c.DTF_Creation_Date__c;
In DTF No filed it is coming like 2100null.
also if I want to add a auto number with this then how to do that.
Please help.