• Bhoomika Bhataria 28
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I built a custom button to clone a case and give it a new record type.
It isn't making the clone copy a parent or the clone as child. I've researched and can't seem to find a reason why it doesn't work.
It also isn't copying the subject details, but I am not sure if they are related issues.

My code is below. Detail Page Button/content source URL
/{!Case.Id}/e?RecordType=0124C0000004Rmh&clone=1
hi iam trying to update lookup field into another lookup field.
i have two objects expense report and region when i update company in expense report object need to update in company on region object

trigger code :

trigger updatecompany on pse__Expense_Report__c(after insert, after update){
        set<Id> ersIds = new set<Id>();

        // get the ids of the er whose company is not equal to null
        for(pse__Expense_Report__c er : trigger.new){
                if(er.ffpsai__OwnerCompany__c != null || er.ffpsai__OwnerCompany__c != ''){
                        ersIds.add(er.Id);
                }
        }

        List<pse__Region__c> reg = new List<pse__Region__c>();

        // query the export report with the er ids
        for(pse__Region__c er : [select id, name, ffpsai__OwnerCompany__c from pse__Region__c where er.id in : ersIds]){
                //assign the company value of er to export report company feidl
                er.ffpsai__OwnerCompany__c = er__r.ffpsai__OwnerCompany__c;

                // add them to the list
                reg.add(er);
        }

        update reg;
}


iam facing error :
Didn't understand relationship 'reg' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names

 
Hi, i m trying to create attendance tracking for school children can any one advise  me for the data modeling ,and how to track 200+ students everday attendance thanks