You need to sign in to do that
Don't have an account?
Miguel Alejandro Salgado
lightning:recordEditForm, mark as missing a field that I'm passing
I have an Issue with this component. When every Try to submit a new OpportunityLineItem
The component sends the following error messages.
I read the component documentation and no hint about this.
Any Idea what It's wrong?
The component sends the following error messages.
An error occurred while trying to update the record. Please try again. ProdConfigCreateOppItem.js:59 undefined ProdConfigCreateOppItem.js:60 REQUIRED_FIELD_MISSING ProdConfigCreateOppItem.js:61 Required fields are missing: [OpportunityId]The problem is that I'm actually sending the required fields, also, I've tried Intercepting the request, and adding the fields manually in an `onsubmit` function.
I read the component documentation and no hint about this.
Any Idea what It's wrong?
<lightning:recordEditForm onload="{!c.handleLoad}" onsuccess="{!c.handleSuccess}" onerror="{!c.getError}" objectApiName="OpportunityLineItem" aura:id="createOppItem"> <lightning:messages /> <lightning:inputField fieldName="Product2Id" /> <lightning:inputField fieldName="UnitPrice" /> <lightning:inputField fieldName="Quantity" /> <lightning:inputField fieldName="ServiceDate" /> <lightning:inputField fieldName="Description" /> <lightning:inputField fieldName="OpportunityId" value="{!v.oppId}"/> <div class="slds-m-top_medium"> <lightning:button variant="brand" type="submit" name="save" label="Add" /> </div> </lightning:recordEditForm>
It might be weird solution but it worked in my cases
Add following snippet at your code after line 14