You need to sign in to do that
Don't have an account?

Master-Detail field default value
I have 2 custom objects, Locations and Systems, which both have a
Master-Detail relation with Account: Systems also has a Locations
lookup field.
Master-Detail relation with Account: Systems also has a Locations
lookup field.
After I created a New Location (record) I would like to create New
Systems (records) from Locations.
Systems (records) from Locations.
How do I set the default value for the (Master-Detail) field Account.Name,
which has already been entered in Locations?
which has already been entered in Locations?
I have tried it with a formula field called Account_ID and a trigger
but I do not get it work:
but I do not get it work:
Code:
trigger CopyAccountID on System__c (before update, before insert) { For (System__c accid:Trigger.new) // { accid.Account__c = accid.Account_ID__c; } // } }
Message Edited by Peter van Heck on 09-22-2008 05:29 AM
obviously you should have the System Id on Location
hope I can help you
well i dont know much about this but hope this will help you
try using the realtionship name like
System.Account = Locations__r.Account_Name;
perhaps you can find a way with this.