Better look at the relationship on which this 'look up' is based. (I'd use the looked up value option myself, but then I'm "old school"--having used this option before the calculation option was available.)
I tried the lookup method, no change. it's really weird because what ever I've done has corrected the test invoices I have but when I create a new invoice the same thing happens. I have attached my relationships.
just to summarise I create a new invoice, I can then add line items via a portal, the line item gets the project from projects and the hourly rate from clients, it is then supposed to work out the cost but it's not, its not bringing across the "day rate" or the "hours in day" values that I need to calculate cost
What are the specific auto-enter options that you have specified for this?
Is it possible that the problem line items were created before you selected a client for the invoice?
Is it possible that you selected a client, then starting entering line items immediately and nothing was looked up?
(I am assuming here that you create a new invoice and then select your client from a value list or similar selection method.) Try this experiment: Select a client for your invoice. Click the layout back ground to commit records. Then create the new line item record in the portal. Does that work reliably?
If that solves the problem, you can use a script trigger to commit records each time you select a client for your invoice.
PS: And beware of this scenario: Create invoice; Select Client; Add Line Items; OOPS! wrong client, better select the right one.... Note that this can leave you with line items with the incorrect rate as they won't automatically update if you make such a correction after the line item has been added to the portal.
that seams to work thank you, I'll create a scripted trigger. would I do it on keystroke or object modify? i've done modify and it seams to work
I wouldn't use keystroke, but I might use Save. It depends on the precise method you use to select a customer. OnObjectModify is my first choice for popup menus, radio buttons and check boxes. OnObjectSave may be the better choice for drop down lists where the user is allowed to also type info into the field. (OnObjectModify can be tripped with each keystroke in such case...)
But I also would use a much more sophisticated method for finding and selecting a customer than using a simple value list in the first place so the method I used might already have a script where I could add the needed commit step.