function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Customobject__r.Name
Account.Name
Trigger FieldupdateOnParent on Child__c(after insert,after update){ Map<id,string> chidvaluesmap = new map<id,string>(); for(Child__c ch:trigger.new){ Child__c oldch = trigger.oldmap.get(ch.id); if(ch.formulafield__c !=Null && (ch.formulafield__c != oldch.formulafield__c) && ch.parent__c!=Null ){ chidvaluesmap.put(ch.parent__c,ch.formulafield__c); } } List<Parent__c> parentupdate = new List<parent__c>(); for(Parent__c p: [select id,Field__c from pder where id=:chidvaluesmap.Keyset()]){ if(chidvaluesmap.containkey(p.id)){ p.Field__c = chidvaluesmap.get(p.id); parentupdate.add(p); } } Update parentupdate; }
Based on condition i need to execute
Can you explain about your requirement.?
Refer the below screenshot, i am referring Account object fields from contact.
Custom object formula reference:
Standard object formula reference:
If this helps, Please mark it as best answer.
Thanks!!
I need create a formla field from Parent object to Child object.
how to write formula field in child object ?
Thanks
KMK
Parent__r.FiendName__C
If my understanding is wrong, then explain about your extact requirement.
Thanks!!
Apologies, My question is wrong,
I need to create a formla field from Child object to Parent object.
how to write formula field in Parent object ? if Yes, i created formula in Child object. I want same field value in parent object.
Thanks
KMK
Its not possible through formula field. you need to write a trigger.
try with below trigger. Modify the fields & object API names as per your org.
If this helps, Please mark it as best answer.
Thanks!!