You need to sign in to do that
Don't have an account?
when is recordId created?
I have a component that creates a form to enter Salesforce Certification Test Results, which provide section level scores. For example:
Test Taker: John Doe
Test Date: 08/02/2017
Exam: Administrator I
Section-Level Scores:
Organization Set-Up (Global UI): 100%
User Setup: 66%
Security and Access: 75%
Standard and Custom Objects: 77%
Sales and Marketing Applications: 75%
Service and Support Applications: 75%
Activity Management and Collaboration: 66%
Data Management: 100%
Analytics - Reports and Dashboards: 100%
Workflow/Process Automation: 80%
Desktop and Mobile Administration: 100%
AppExchange: 100%
When saved, I need to do the following:
Anybody know where to look for an answer?
Test Taker: John Doe
Test Date: 08/02/2017
Exam: Administrator I
Section-Level Scores:
Organization Set-Up (Global UI): 100%
User Setup: 66%
Security and Access: 75%
Standard and Custom Objects: 77%
Sales and Marketing Applications: 75%
Service and Support Applications: 75%
Activity Management and Collaboration: 66%
Data Management: 100%
Analytics - Reports and Dashboards: 100%
Workflow/Process Automation: 80%
Desktop and Mobile Administration: 100%
AppExchange: 100%
When saved, I need to do the following:
- Save the Exam name, User name, Exam date to a NEW Result__c record. Result__c is my PARENT object in a Master-Detail Relationship.
- Create x number of child objects in Result_topic__c[], saving Topic Name, Score, and the recordID of the new result__c record. But that parent record is being created in the same operations (one form submission).
Anybody know where to look for an answer?
It is very simple you need to insert first parent record which is Result__c and then you can insert Result_topic__c reocrds with then id of newly insert result and when you inserting Result__c first then it reocrdid is automatilly created.
If you are not getting my point then let me know.
Thanks
Hemant
- Save the Exam name, User name, Exam date to a NEW Result__c record. Result__c is my PARENT object in a Master-Detail Relationship.
- Retrieve the recordID from that new record... or would that be provided in response.getReturnValue().id?
- Create x number of child objects in Result_topic__c[], saving Topic Name, Score, and the recordID of the new result__c record. But that parent record is being created in the same operations (one form submission).
I'll try to test it...Thanks again for your response!
I dont know your problem is solved or not.If your problem is not solved then share you code so i will make change in that.And then you can try to test.If you are not comfertable to share then we can connect on skype."sonihemant26" this is my skype id.
Thanks
Hemant
I've had to wait on testing this, as I'm dealing with another issue that happens before the save -- validating the form and getting the info ready to save. My issue is that the form is generated dynamically, using the aura:iterate. I'm doing that because each exam has a different number and set of topics.
I had written a detailed explanation of my issue, but in explaining it to you, I had a breakthrough -- so I'm redoing some of my code. I'll respond again when I can test some things.
THANK YOU -- this correspondence has facilitated a breakthrough!
Pat
I've tracked my issue down to the fact that when I'm iterating to create each ui.inputNumber on the form, I can't seem to dynamically set the aura:id. Without that id, I don't know a way to go back after the form is submitted and extract the input data. I'm going to start a new thread on this issue.
As an example, using standard objects, if I created a new opportunity, then viewed that opportunity, I could see related list of products. Since it's a new opportunity, there are currently no related products listed, so I click NEW.
At this point, the form for new Opportunity Product opens, and the Opportunity parent object is pre-populated.
So if I were creating a custom component for new Opportunity product, how would I pre-populate the parent object?