You need to sign in to do that
Don't have an account?
acrozier
creating adhoc object
I have created a form that our company uses for an incentive invoice. This form is generated off of a custom object that would retain the information. The invoice has a fluctuating number of line items and I would like users to be able to add/subtract these items as needed without having to create a bunch of unnecessary fields. Is there any way to do this?
If it were me, I'd look to model the line item as a separate custom object. That way you can build a datatable (or similar repeater) based on a list of these objects.
I wrote a blog post regarding managing a list of new objects - this would be straightforward to adapt to your requirement I think:
http://bobbuzzard.blogspot.com/2011/07/managing-list-of-new-records-in.html
this is great and very helpful. I am just having one problem which is probably my own stupidity. How can I add that object as a related list to a custom object? Or is this even possible? If not, how can I put a button from my custom object to the page when the controller has to be set as ManageListController and not Job__c (my custom object)
Ok, so I am getting somewhere, just need to learn how I can incorporate this. Below the modified code to write to the AIIincentive object.
What I would like to do is have users enter these incentive amounts off of the Job__c object that we have. I have a two part question on executing this.
1. how can I relate the Incentives to the Job they were created off of
2. I would like to display the incentive lines as either a related list or a button. How can i accomplish either of these?
Your incentives would need a lookup or master detail relationship to a job record. That would add them as children when saving. Once this relationship is in place, you can show them as a related list by adding the Incentives related list to the jobs page layout.