• vinny r
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 3
    Replies
I am trying to update FinServ__AssetsAndLiabilities__c record using lightning data service. I am getting below error while trying to save record.

saving record, error: [{"fieldErrors":{"Id,Name":[{"message":"No access to field Id,Name. Either the field was removed from the entity or access to this field was removed.","fieldApiName":"Id,Name"}]},"pageErrors":[]}]


I have removed all the fields and using only Name, which is a required field. But still I am getting the error. I am able to create/update FinServ__AssetsAndLiabilities__c records using standard page.
I am getting only the below generice error message in lightning:RecordForm compoennt

An error occurred while trying to update the record. Please try again.

But I see the below error in the onerror event parameter.

"message":"An error occurred while trying to update the record. Please try again.","detail":"","output":{"errors":[],"fieldErrors":{"Name":[{"constituentField":"LastName","duplicateRecordError":null,"errorCode":"REQUIRED_FIELD_MISSING","field":"Name","fieldLabel":"Last Name","message":"Required fields are missing: [LastName]"}]}}

Also the required fields astrerik is not appearing next to the requied fields 
Hi,

When I try to run the lightnig readiness report in the trailhead playground for Lightning Experience Rollout Specialist Challenge-1, I am getting the below error. I have tried running the report multiple times and I am getting the same error for last 3 days.

Offline for maintenance. The app in undergoing maintenance right now. Please check back later.

User-added image
I am getting below error. Can someone please help

Challenge Not yet complete... here's what's wrong:
The FiveStarRating controller placeholders aren't filled in correctly.


Please see my code below.

FiveStarRating.cmp
 
<aura:component >
    <aura:attribute name="value" type="integer" default="0"/>
    <aura:attribute name="readOnly" type="boolean" default="false"/>
    <ltng:require styles="{!$Resource.fivestar + '/rating.css'}" scripts="{!$Resource.fivestar + '/rating.js'}" afterScriptsLoaded="{!c.afterScriptsLoaded}"/> 
 	<aura:handler name="change" value="{!v.value}" action="{!c.onValueChange}"/>
    
    <ul aura:id="ratingarea" class="{!v.readOnly?'c-rating readonly':'c-rating'}">
    </ul>	
</aura:component>
FiveStarRatingController.js
 
({
	onValueChange:function(component,event,helper)
    {
      	console.log('In onValueChange function')
          if(component.ratingObj)
        {
            var value=component.get('v.value');
            component.ratingObj.setRating(value,false);
        }
    },
    afterScriptsLoaded:function(component,event,helper)
    {
        var domE1 = component.find("ratingarea").getElement();
        var readOnly = component.get('v.readOnly');
        var currentRating = component.get('v.value');
        var maxRating = 5;
        var callback = function(rating)
        				{
                            component.set('v.value',rating);
                        }
        
        component.ratingObj=rating(domE1,currentRating,maxRating,callback,readOnly);
    }
})


 
Hi,
 
I have the below code to create a new boat record using the selected boat type as the default value for boat type field.
 
handleNewClick:function(component,event,helper)
{
    var selectedBoatTypeId = component.get("v.selectedBoatTypeId");
    console.log('Selected Boat Type Id' + selectedBoatTypeId);
    var event = $A.get('event.force:createRecord');
    event.setParam({"entityApiName":"Boat__c",
                    "DefaultFieldValues":{
                        "BoatType__c": selectedBoatTypeId
                    }
                   });
    event.fire();
}
I am getting the error

“Looks like there's a problem.
Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details.
Error ID: 486631403-396 (-2024287495)”

User-added image
Can you please let me know why I am getting this error.

Thanks
Vinny
Hi 

I am using the below code to set the component attribute in the init event. The server controller is returning the values, which I am assigning to the component attribute. But the value is not getting set. Can you please help.
 
({
    doInit:function(component,event,helper){
    console.log('start of init method');
    var options = component.get("v.options");
    options.push({'label':'Pleasure Boat','value':'PB'});
	var action = component.get("c.getBoatType");
    action.setCallback(this,function(response){
                       var state = response.getState(); 
                       if(state == "SUCCESS")
                       {
                           var resp = response.getReturnValue();
                           console.log("length of array " + resp.length);
                           component.set("v.boatType",resp);
                           var bt = component.get("v.boattype"); 
                           console.log('BT ' + bt.length);
                        }
        				else
                        {
                            console.log("Failed with state " + state);
                        }
    					});
	$A.enqueueAction(action);
}
})

User-added image

Thanks
Vinodh.
Hi,

I am starting my salesforce lightning component framework superbadge and I have written the below code. I am using the component in a lightning app and using the preview for testing. Can you please let me know why the dropdown menu and buttons are not aligned properly.

Code

<aura:component >
    <aura:attribute name="attr_selectTypeBoat" type='String[]' default='All Types'/>
    <lightning:layout horizontalAlign="center">
            <lightning:layoutItem flexibility="auto" padding="around-small" >
                <lightning:select aura:id="selectTypeBoat" name="selectType" label='Please select'>
                    <aura:iteration items='{!v.attr_selectTypeBoat}' var='option'>
                        <option value='{!option}' text='{!option}' />
                    </aura:iteration>
                </lightning:select>
            </lightning:layoutItem>
            <lightning:layoutItem flexibility="auto" padding="around-small" >
                <lightning:button label="Search" variant="brand"/>
            </lightning:layoutItem>
            <lightning:layoutItem flexibility="auto" padding="around-small">
                <lightning:button label="New" variant="neutral"/>
            </lightning:layoutItem>
        </lightning:layout>
</aura:component>

Output

User-added image

Thanks
Vinny
 
I am getting only the below generice error message in lightning:RecordForm compoennt

An error occurred while trying to update the record. Please try again.

But I see the below error in the onerror event parameter.

"message":"An error occurred while trying to update the record. Please try again.","detail":"","output":{"errors":[],"fieldErrors":{"Name":[{"constituentField":"LastName","duplicateRecordError":null,"errorCode":"REQUIRED_FIELD_MISSING","field":"Name","fieldLabel":"Last Name","message":"Required fields are missing: [LastName]"}]}}

Also the required fields astrerik is not appearing next to the requied fields 
Hi,
 
I have the below code to create a new boat record using the selected boat type as the default value for boat type field.
 
handleNewClick:function(component,event,helper)
{
    var selectedBoatTypeId = component.get("v.selectedBoatTypeId");
    console.log('Selected Boat Type Id' + selectedBoatTypeId);
    var event = $A.get('event.force:createRecord');
    event.setParam({"entityApiName":"Boat__c",
                    "DefaultFieldValues":{
                        "BoatType__c": selectedBoatTypeId
                    }
                   });
    event.fire();
}
I am getting the error

“Looks like there's a problem.
Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details.
Error ID: 486631403-396 (-2024287495)”

User-added image
Can you please let me know why I am getting this error.

Thanks
Vinny
Hi 

I am using the below code to set the component attribute in the init event. The server controller is returning the values, which I am assigning to the component attribute. But the value is not getting set. Can you please help.
 
({
    doInit:function(component,event,helper){
    console.log('start of init method');
    var options = component.get("v.options");
    options.push({'label':'Pleasure Boat','value':'PB'});
	var action = component.get("c.getBoatType");
    action.setCallback(this,function(response){
                       var state = response.getState(); 
                       if(state == "SUCCESS")
                       {
                           var resp = response.getReturnValue();
                           console.log("length of array " + resp.length);
                           component.set("v.boatType",resp);
                           var bt = component.get("v.boattype"); 
                           console.log('BT ' + bt.length);
                        }
        				else
                        {
                            console.log("Failed with state " + state);
                        }
    					});
	$A.enqueueAction(action);
}
})

User-added image

Thanks
Vinodh.