• Suchismita Mukherjee 7
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi,

I have done the process builder but it is showing me error:
"The Fulfillment Creation Process does not appear to be working properly.Please check your task was created with all of the field values set appropriately"

My process builder is:
process builder

User-added image
User-added image


User-added imageUser-added image
Hi All,
I am getting the error "The campingList JavaScript helper doesn't appear to have the correct functionality. Ensure that it is saving the new record to the database and in the callback, pushing the new record to the array of existing items (e.g., v.items) and setting the modified array of items to the 'items' value provider to display the updated list." Please help me to resolve the error.
My code:

campingList.cmp
<aura:component controller="CampingListController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
 <!--<ol>
    <li>Bug Spray</li>
    <li>Bear Repellant</li>
    <li>Goat Food</li>
    </ol>-->
    <!--<aura:attribute name="olditem" type="Camping_Item__c"/>-->
    <ltng:require styles="/resource/SLDS105/assets/styles/salesforce-lightning-design-system-ltng.css"/>
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    <aura:attribute name="newItem" type="Camping_Item__c" default="{'sobjectType':'Camping_Item__c',
                                                                   'Quantity__c': 0,
                                                                   'Price__c': 0.0}"/>
   
   <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <div class="slds-card slds-p-top--medium">
    <lightning:card title="Existing Items">
        <p class="slds-p-horizontal--small">
            <aura:iteration items="{!v.items}" var="itms">
                <c:campingListItem item="{!itms}"/>
            </aura:iteration>
        </p>
    </lightning:card>
    <br/>
    <!-- CREATE NEW Camping FORM Name, Quantity, Price, and Packed-->
    <form class="slds-form--stacked"> 
        <lightning:input aura:id="campingform" label="Name"
                             name="campingname"
                             value="{!v.newItem.Name}"/>
        <lightning:input type="number" aura:id="campingform" label="Quantity"
                             name="Quantity"
                             min="1"
                             value="{!v.newItem.Quantity__c}"
                             messageWhenRangeUnderflow="Enter an atleast 1 digit"/>
        <lightning:input type="number" aura:id="campingform" label="Price"
                             name="Price"
                             min="0.1"
                             formatter="currency"
                             step="0.01"
                             value="{!v.newItem.Price__c}"
                             messageWhenRangeUnderflow="Enter an amount that's at least $0.10."/>
        <lightning:input type="checkbox" aura:id="campingform" label="Packed?" 
                             name="Packed"
                             checked="{!v.newItem.Packed__c}"/>
        <lightning:button label="click to Create Item"
                              class="slds-m-top--medium"
                              variant="brand"
                              onclick="{!c.clickCreateItem}"/>
    </form>
    <br/>
     <lightning:card title="Items">
        <p class="slds-p-horizontal--small">
            <aura:iteration items="{!v.items}" var="itms">
                <c:campingListItem item="{!itms}"/>
            </aura:iteration>
        </p>
    </lightning:card>
    </div>
</aura:component>

campingListController.js
({
    doInit: function(component, event, helper) {
        var action=component.get("c.getItems");
        action.setCallback(this,function(data){
           
            component.set("v.items",data.getReturnValue());
            })
        $A.enqueueAction(action);
    },
 clickCreateItem : function(component, event, helper) {
        var newitem= component.get("v.newItem");
        helper.createItem(component, newitem);
           /*var item=JSON.parse(JSON.stringify(newitem));
            console.log("the new item:"+JSON.stringify(newitem));
            //newitem.push(item);
            component.set("v.items",newitem);
            component.set("v.newItem",{'sobjectType':'Camping_Item__c',
                'Name': '',
                'Quantity__c': 0,
                'Price__c': 0,
                'Packed__c': false});*/
         
  $A.enqueueAction(action);
 }
})


campingListHelper.js
({
 createItem : function(component, newitem) {
        var validitems =component.find('campingform').reduce(function(validSoFar,inputCmp){
             inputCmp.showHelpMessageIfInvalid();
            return validSoFar && inputCmp.get('v.validity').valid;
        }, true);
        if(validitems){
        var actionsave=component.get("saveItem");
            //var strng=JSON.parse(JSON.stringify(newitem);
            actionsave.setParams({"ci": newitem});
            actionsave.setCallback(this,function(data){
                var state = data.getState();
             if (state === "SUCCESS") {
                    var campings=component.get("v.items");
                    campings.push(data.getReturnValue());
                    component.set("v.items",campings);
                    component.set("v.newItem",{'sobjectType':'Camping_Item__c',
                'Name': '',
                'Quantity__c': 0,
                'Price__c': 0,
                'Packed__c': false});
                }
            })
        }
 }
})
campingListController.apxc
public class CampingListController
{
    @AuraEnabled
    public static list<Camping_Item__c> getItems()
    {
        return([Select Name,Price__c,Quantity__c,Packed__c from Camping_Item__c]);
    }
 @AuraEnabled
    public static Camping_Item__c saveItem(Camping_Item__c ci){
        insert ci;
        return ci;
    }
}
Hi,

I have done the process builder but it is showing me error:
"The Fulfillment Creation Process does not appear to be working properly.Please check your task was created with all of the field values set appropriately"

My process builder is:
process builder

User-added image
User-added image


User-added imageUser-added image