RE: Getting Parent Record ID during OnCreate (PreValidate)
Hello Scott, thanks for the answer. I am afraid I was not very clear with the requirement.
I totally get the point that the record ID is not created until the record if created. My requirement is not to get "that" record ID, but the ID of the parent to which the child record is being created.
I will try to explain the requirement. I have a custom entity called "item" which is being budgeted for the year. The item will be shared among one or more "services" (another custom entity). I need to allocate this item to one or more services for which I have an intermediate custom entity called "ItemServices" (similar to "Opportunity", "Product" and "OpportunityProduct" concept in OOB). ItemService records will be child to Item record where the service will be selected and a percentage allocated field need to be filled. The collective percentage should not exceed 100, which is the validation required. Quick Create forms are used to create ItemService record when + on the ItemService subgrid on item is pressed. So, before save I need to get the parent record ID and check all the other ItemServices record associated with that item and validate the percentage entered whether the total is equal to or below 100%. Hope this is clear.