• jenish shingala
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Salesforce Developer
  • KPIT


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
I have contact object and there is a custom object. on the contact page layout I have a related list for custom object. now my requirement is based on the logged in user public group I want to display the custom object records using inline VF page. can someone please code  this.


Thanks 
Hi All

I have created a trigger for before insert which is fired on the basic of record creation.i need to add before insert and after update event but its not working,can any body find my fault.
trigger setBalance on BankBookTest__c (before insert,after update){
    Set<Id> masterTestIds = new Set<Id>();
    
    for(BankBookTest__c bankBook : trigger.new){
        if(bankBook.BankAccount__c != null){
            masterTestIds.add(bankBook.BankAccount__c);
        }
        if(bankBook.Party_Code__c != null){
            masterTestIds.add(bankBook.Party_Code__c);
        }
    }
    
    Map<Id,MasterTest__c> masterTestRecords = new Map<Id,MasterTest__c>();
    for(MasterTest__c master : [Select Closing_Balance__c from MasterTest__c where id in :masterTestIds]){
        masterTestRecords.put(master.id, master);
    }
     
    for(BankBookTest__c bankBook : trigger.new){
        if(masterTestRecords.containsKey(bankBook.BankAccount__c)){
            bankBook.Bank_Opening_Balance__c = masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c;
            if(bankBook.Transaction_Type__c == 'Payment'){
                bankBook.Bank_Closing_Balance__c = masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c - bankBook.Amount__c;
            }
            if(bankBook.Transaction_Type__c == 'Reciept'){
                bankBook.Bank_Closing_Balance__c = masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c + bankBook.Amount__c;
            }
        }
        
        if(masterTestRecords.containsKey(bankBook.Party_Code__c)){
            bankBook.Party_Opening_Balance__c = masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c;
            if(bankBook.Transaction_Type__c == 'Payment'){
                bankBook.Party_Closing_Balance__c = masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c + bankBook.Amount__c;
            }
            if(bankBook.Transaction_Type__c == 'Reciept'){
                bankBook.Party_Closing_Balance__c = masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c - bankBook.Amount__c;
            }
        }
        
        if(bankBook.Transaction_Type__c == 'Payment'){
            masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c = masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c - bankBook.Amount__c;
            masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c = masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c + bankBook.Amount__c;
        }
        if(bankBook.Transaction_Type__c == 'Reciept'){
            masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c = masterTestRecords.get(bankBook.BankAccount__c).Closing_Balance__c + bankBook.Amount__c;
            masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c = masterTestRecords.get(bankBook.Party_Code__c).Closing_Balance__c - bankBook.Amount__c;
        }
        bankBook.To_DateFUP__c=bankBook.Date__c;
        bankBook.From_DateFUP__c=bankBook.Date__c;
    }
}


 
I am using a process builder to assign value to child from the parent object.
I have one relevant field on both,but having different data types so I am facing the issue.
Parent Field data type: Text (skdate_finish__c)
Chid Field data type : Datetime (Invoice_Finish__c)
User-added image
By using the formula I am trying to get the value : DATETIMEVALUE(skdate_finish__c) This is not working for me.
Please help me to solve this issue.
Hi folks, 
Below is my requirement.

i want to develop a VF page with some buttons, when i click those buttons, each should play each separate audio which i assing to button independently.

How can i approach ? what tricks it can use.


Thanks.