whats the total number of ps in:
q: update parent field with child field i want to update custom field price_book_entry_floor_price__c from pricebook object (pricebook2) with value from custom field floor_price__c from price book entry object (pricebookentry), i have below trigger but something is wrong, i dont see anyother way besides trigger please help
pricebook2 = parent object
pricebookentry = child object
trigger:
trigger updateparent on pricebook2 (after insert, after update) {

    map<id, pricebook2> parentpricebook = new map<id, pricebook2>();
    list<id> listids = new list<id>();

    for (pricebookentry childobj : trigger.new) {
        listids.add(childobj.pricebook2);
    }

    parentpricebook = new map<id, pricebook2>([select id,price_book_entry_floor_price__c,(select id, floor_price__c from pricebookentry__r) from pricebook2 where id in :listids]);

    for (pricebookentry pe: trigger.new) {
        pricebook2 ppbook = parentpricebook.get(pe.floor_price__c);
        ppbook.price_book_entry_floor_price__c = pe.floor_price__c;
    }

    update parentpricebook.values();
}


a: your trigger is currently running on pricebook2 (parent object) not pricebookentry (child object) and unfortunately salesforce doesnt support triggers on pricebook entry yet. 
the better option left for you is to do it as a batch job which takes the value from the pricebook entry and udpates the pricebooks.
heres an idea you can vote up in the meantime

user
I counted 65 "p"s in that text.
assistant