You need to sign in to do that
Don't have an account?
vijendhar
checkbox is set to false whenever the parent record or related child record are modified
Hi All,
i have a requirement on account to contact objects, in that in contacts object have once check box export=true , if data have changed in account or contact objects then export has to be false( export =false. ) in contact object.
can any one have best solution or code for it could u share with us
Thanks All
i have a requirement on account to contact objects, in that in contacts object have once check box export=true , if data have changed in account or contact objects then export has to be false( export =false. ) in contact object.
can any one have best solution or code for it could u share with us
Thanks All
If changes are modified in contact you can update that checkbox with the help of workflow rule.
But if any changes in account then you have to write a after update trigger in account and update the contact values.
Hope this helps you!
Thanks.
trigger updatefields on Contact(before update,After update){
if(trigger.isbefore){
contact consv=new contact();
for(contact conesc:trigger.new){
if(consv.checkbox__c==false){
conesc.mobilephone=conesc.phone;
}
}
}
if(trigger.isafter){
list<Account> chk=[select id,BillingCity,ShippingCity,Fax,Phone,(select Checkbox__c from contacts) from Account];
list<Account> lisacc1=new list<Account>();
for(Account liscvs:chk){
for(contact liscones:liscvs.contacts){
if(liscones.checkbox__c==true){
liscvs.phone=liscvs.fax;
}
}
lisacc1.add(liscvs);
}
update lisacc1;
}
}
try to this help hopes
Thanks
kullayappa
9731512878
tnx for your replay. i solved this by issue modifying some code in apex class . and your anser also helped me to learn new way.
Vijendhar
this kullayappa i am looking fresher salesforce job do have any openings could please help me
thanks
kullayappa
9731512878