• Caleb Kuester
  • NEWBIE
  • 29 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 14
    Replies
Greetings! 

I need to recreate a standard page for article approvals, but add a column for a custom field.

The problem is that I don't know how that page is querying for the data. I don't know exactly what objects it's querying. I do know that the knowledge article objects don't have any of the fields that could be used for the colums. ProcessInstance also doesn't have the required fields. I almost want to think that this is not possible, but the default KA approvals page is definitely getting its data.

The columns are: Related To | Type | Submitter | Most Recent | Approver | Date Submitted
HI!

So I'm curious if Streaming API is not supposed to be LockerService-friendly. 

It complains at: "var cometd = new window.org.cometd.CometD();"

Specifically, it doesn't like "window.org."

Is there any way around this?
 
Greetings! I have some corde that fails to reach the apex method within a JS method. 
save.setParams({
            "appId":helper.getUrlParam(component, "applicationId"),
            "sObjects":JSON.stringify(sObjects)
        });
        save.setCallback(this, function(response){
            if(component.isValid() && response.getState()=="SUCCESS"&&response.getReturnValue()!=null){
                console.log(response.getReturnValue()); 
            }else{
                console.log("response is: "+response.getReturnValue()); 
                console.log("Failed to save"); 
            }
        });
        $A.enqueueAction(save);
I can confirm that applicationId has an ID (console.log)
I can confirm that sObjects contains the data necessary (console.log)

My Apex controller is: 
public static APXCrudResponse save(Id appId, List<SObject> sObjects) {
		System.debug('---> arbitraryPrintStatement');
                return null; 
	}

For whatever reason, my Apex debug log shows no debug statements unless I remove the arguments of the front-end Javascript call. It is, however, receiving a null input. 

How am I not possibly reaching the inside of the Apex controller?
Greetings!

I am under the impression that the first set of tokens must be within a file called "defaultTokens.tokens." That's all well and good, but what if you want to have the same page rendered with multiple different style options using a different .tokens file?

I see that there's an "extends = "c:defaultTokens">" option, but what is the point of it? I can't seem to access the new tokens within the "arbitraryTokens.tokens" file? Do I have to declare that I'm using a different tokens file?

Also, are there any other means by which I can accomplish this feature?

Thanks in advance for your expertise!

Greetings!

I am heading down the trail of Admin Beginner. Actually, I have just finished... but not quite. 

There's one trail that appears stuck. It's the Admin Beginner trail called "Visualizing Your Data."

The instructions are as-follows: 

  • The report should be named 'Cases by Status' and saved to the 'Unfiled Public Reports' folder.
  • The new report should be of type Cases.
  • The report format should be a summary report.
  • The report should be grouped by the Status field on Case.
  • The date range for the report should be for All Time.
  • Make sure to show details on the report by enabling 'Details'. This will make column data visible and editable. Display any columns you like but they must include Case Owner and Account Name.
  • Create a Dashboard named 'Cases Dashboard' and save it in the 'My Personal Dashboards' folder.
  • Use the 'Cases by Status' Report as the source report.
  • Use the pie chart dashboard component, and make sure the units displayed are by record count.
  • Make 'Cases by Status' the header and 'New vs Closed' the title.
I made the report, but saved it into the default folder instead of My Personal Dashboards on the fourth-to-last step. 

"No problem," I thought. I'll just delete it and start again. 

WRONG!

I can't create a new one because one already exists. Per Googling instructions, I decided that I should empty the recycle bin (what the hell is the recycle bin doing here? A responsible person backs-up data already. This is useless!) -- so I promptly empty it. 

WRONG!

Apparently, I was supposed to un-trash it, rename it, then trash it again, before making it again. 

Well, the only problem with that is that I can't find a way to rename dashboards anyways. 

I suppose my question is threefold: 
1) Do I have to wait until next week in order to fix this (per further Googling). 
2) Is there any other way to fix this?
3) Is Trailhead/Salesforce going to be this... unrefined through its entirety? This is worse than Bash scripting and that's nearly unintelligible. At least it works. (Delete a user, anyone?)

Thanks!
-Caleb
Greetings!

So I have developed a custom lightning component. Now, I would like to add it to one of the drag-and-drop pages. Fortunately, there's a section labeled "Custom Components." Unfortunately, it's empty, despite having coded a custom component within the org. 

How does this become resolved?
Greetings!

I am still new to this and I am trying to add a MultiselectPicklist visualforce component into a lightning component using the following syntax: 
<c:MultiselectPicklist leftLabel="Available Contacts"
                leftOptions="{!allContacts}"
                rightLabel="Selected Contacts"
                rightOptions="{!selectedContacts}"
                size="14"
                width="150px"/>

The error within my lightning app reads: "Failed to save undefined: No COMPONENT named markup://c:MultiselectPicklist found : [markup://c:OpportunityTeamBox]"

The Multiselect Picklist is installed as a package. 

From what I understand, using a component in lightning follows a similar syntax to using a component in visualforce. A lightning developer, I'm sure, will instantly be able to spot the problem, but I'm not able to search for a solution to being able to use a multiselect picklist in lightning. 

If anybody has suggestions, I would be happy to see 'em. 
Greetings! I'm at it again. This time, I have working code. 

The problem is: 
"Challenge Not yet complete... here's what's wrong: 
The campingList component isn't iterating the array of 'items' and creating 'campingListItem' components."

So for starters, I can say that it is. 
My campingList component contains this code. 
<aura:iteration items="{!v.items}" var="item">
     <c:campingListItem campingListItem="{!item}"/>
</aura:iteration>
I don't know how it could possibly resolve this problem any better than "correct." I know that it's iterating through them because:
 evidence
^This is after a couple of entries. 

Is this a common problem? Does anybody else have experience with this? I didn't post all of my code to keep this as short as possible. If required, I can certainly do so. 

Additionally, the entirety of the code that generates this is directly from the Trailhead example... copy/paste, but with the variable names renamed appropriately. If my code fails to meet their criteria, then so does theirs. 
I am working with a Lightning Component Trailhead example: https://trailhead.salesforce.com/lex_dev_lc_basics/lex_dev_lc_basics_forms

Don't worry about providing a free "passing grade," this is just the copy/pasted provided example. I wish to understand this prior to moving to the challenge. 

The components and controller and helper are as follows: 
expenseApp.app (provides the styles correctly):
<aura:application >
    <ltng:require styles="{!$Resource.SLDS +
         '/assets/styles/salesforce-lightning-design-system-ltng.css'}"/>
    <div class="slds">
        <c:expenses />
    </div>
</aura:application>

expenses.cmp: 
<aura:component >
    <aura:attribute name="newExpense" type="Expense__c"
                    default="{ 'sobjectType': 'Expense__c',
                             'Name': '',
                             'Amount__c': 0,
                             'Client__c': '',
                             'Date__c': '',
                             'Reimbursed__c': false }"/>
    <div class="slds-page-header" role="banner">
        <div class="slds-grid">
            <div class="slds-col">
                <p class="slds-text-heading--label">Expenses</p>
                <h1 class="slds-text-heading--medium">My Expenses</h1>
            </div>
        </div>
    </div>
    <!-- / PAGE HEADER -->
    <!-- NEW EXPENSE FORM -->
    <div class="slds-col slds-col--padded slds-p-top--large">
        <!-- [[ expense form goes here ]] -->
    </div>
    <div class="slds-col slds-col--padded slds-p-top--large">
        <div aria-labelledby="newexpenseform">
            <!-- BOXED AREA -->
            <fieldset class="slds-box slds-theme--default slds-container--small">
                <legend id="newexpenseform" class="slds-text-heading--small 
                                                   slds-p-vertical--medium">
                    Add Expense
                </legend>
                <!-- CREATE NEW EXPENSE FORM -->
                <form class="slds-form--stacked">
                    <div class="slds-form-element slds-is-required">
                        <div class="slds-form-element__control">
                            <ui:inputText aura:id="expname" label="Expense Name"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Name}"
                                          required="true"/>
                        </div>
                    </div>
                    <div class="slds-form-element slds-is-required">
                        <div class="slds-form-element__control">
                            <ui:inputNumber aura:id="amount" label="Amount"
                                            class="slds-input"
                                            labelClass="slds-form-element__label"
                                            value="{!v.newExpense.Amount__c}"
                                            required="true"/>
                            
                        </div>
                    </div>
                    <div class="slds-form-element">
                        <div class="slds-form-element__control">
                            <ui:inputText aura:id="client" label="Client"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Client__c}"
                                          placeholder="ABC Co."/>
                        </div>
                    </div>
                    <div class="slds-form-element">
                        <div class="slds-form-element__control">
                            <ui:inputDate aura:id="expdate" label="Expense Date"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Date__c}"
                                          displayDatePicker="true"/>
                        </div>
                    </div>
                    <div class="slds-form-element">
                        <ui:inputCheckbox aura:id="reimbursed" label="Reimbursed?"
                                          class="slds-checkbox"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Reimbursed__c}"/>
                    </div>
                    <div class="slds-form-element">
                        <ui:button label="Create Expense"
                                   class="slds-button slds-button--brand"
                                   press="{!c.clickCreateExpense}"/>
                    </div>
                </form>
                <!-- / CREATE NEW EXPENSE FORM -->
            </fieldset>
            <!-- / BOXED AREA -->
        </div>
        <!-- / CREATE NEW EXPENSE -->
    </div>
    <!-- / NEW EXPENSE FORM -->
	<br/>
    <c:expensesList expenses="{!v.expenses}"/>
</aura:component>

expensesController.js: 
({
    clickCreateExpense: function(component, event, helper) {

        // Simplistic error checking
        var validExpense = true;

        // Name must not be blank
        var nameField = component.find("expname");
        var expname = nameField.get("v.value");
        if ($A.util.isEmpty(expname)){
            validExpense = false;
            nameField.set("v.errors", [{message:"Expense name can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }

        // ... hint: more error checking here ...

        // If we pass error checking, do some real work
        if(validExpense){
            // Create the new expense
            var newExpense = component.get("v.newExpense");
            console.log("Create expense: " + JSON.stringify(newExpense));
            helper.createExpense(component, newExpense);
        }
    }
})

expensesHelper.js: 
({
    createExpense: function(component, expense) {
        var theExpenses = component.get("v.expenses");
        // Copy the expense to a new object
        // THIS IS A DISGUSTING, TEMPORARY HACK
        var newExpense = JSON.parse(JSON.stringify(expense));
 		console.log("Create expense is defined: " +JSON.stringify(newExpense)); 
        theExpenses.push(expense);
        component.set("v.expenses", theExpenses);
    }
})

expenseItem.cmp: 
<aura:component >

    <aura:attribute name="expense" type="Expense__c"/>

    <p>Amount:
        <ui:outputCurrency value="{!v.expense.Amount__c}"/>
    </p>
    <p>Client:
        <ui:outputText value="{!v.expense.Client__c}"/>
    </p>
    <p>Date:
        <ui:outputDate value="{!v.expense.Date__c}"/>
    </p>
    <p>Reimbursed?:
        <ui:outputCheckbox value="{!v.expense.Reimbursed__c}"/>
    </p>

</aura:component>

expensesList.cmp: 
<aura:component >
	<aura:attribute name="expenses" type="Expense__c[]" default ="{[v.firstExpense, v.firstExpense, v.firstExpense]}"/>
    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Expenses</h3>
        </header>
        
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.expenses}" var="expense">
                    <c:expenseItem expense="{!expense}"/>
                </aura:iteration>
            </div>
        </section>
    </div>
</aura:component>

The screen: 
lightning component
the error (when adding an item): 
User-added image

The console: 
User-added image

So it looks like there is a well-defined object that is intended to be pushed into the array. I tried to remove the JSON.stringify, prior to the push, but that created the same error. 

Any assistance would be helpful. 
 
Greetings! I need some assistance. 

I am a beginner to both Salesforce standard and Salesforce Lightning. 

I understand that traditional Salesforce is broken-up into a markup language and an OO language, specifically, Visualforce and Apex. When we come to Lightning, of course, everything had to be completely different syntax while retaining nearly the same fundamental main idea. There is a markup language and an OO component.

What are these two called? I can't Google my issues efficiently because I lack even the understanding of the terminology. As far as I'm aware, they have no names. I have been Googling a problem for several hours, to no avail. 

I am moving through one of the tutorials in trailhead. As I am directly copy/pasting the examples and following instructions, I am receiving an error. Instead of ignoring that error and moving to the next lesson, I'm hoping to find a way to resolve the problem.

I'm trying to figure out how to add items to an array in markup. 

I have an object: 
<aura:attribute name="firstSubject" type="Subject__c"
default="{ 'sobjectType': 'Subject__c',
                    'Name': 'qwerty',
                    'Number__c': 3,
                    'Name2__c': 'company',
                    'Yesterday__c': 'Aug 30, 2016',
                    'Hilarious__c': true}"/>
Afterward, I have an array declaration: 
<aura:attribute name="subjects" type="Subject__c[]" default ="{[v.firstSubject, v.firstSubject, v.firstSubject]}"/>
or is it: 
<aura:attribute name="subjects" type="Subject__c[]" default ="{[firstSubject, firstSubject, firstSubject]}"/>
or is it something else? I even tried with single quotes over them, as if they were strings. 

In any event, my loop: 
<aura:iteration items="{!v.subjects}" var="det">
    <p> Name: {!det.Name}</p>
</aura:iteration>
--prints nothing, no matter what I try to input as references to the declared object. 

Every example that I see on the internets uses strings as an example. How do I use something else?
Greetings!

I have a problem.

The Trailhead Lightning Developer challenge requirements are listed as: 
  • Create a compenent called campingListItem.
  • Add an attribute named item for type Camping_Item__c that is required.
  • Display the Name, Price, Quanity and Packed status using the appropriate output fields
My component within my developer org is called campingListItem. 

The code is here:
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" default="{ 'Name': 'asdf',
               'Price__c': '0',
               'Quantity__c': '3',
               'Packed__c': true
             }"/>
    <p>Name: <ui:outputText value="{!v.item.Name}" /> </p>
    <p>Price: <ui:outputCurrency value="{!v.item.Price__c}" /> </p>
    <p>Quantity: <ui:outputNumber value="{!v.item.Quantity__c}" /> </p>
    <p>Packed status: <ui:outputCheckbox value="{!v.item.Packed__c}" /> </p>
</aura:component>

I have tried both uninstantiated and instantiated values for "item." I have tried with and without text descriptions of the items. This challenge will not validate as successful and I find the description itself mildly vague. 

What could I be doing wrong?

Thanks in advance, 
SomeForumGuy
HI!

So I'm curious if Streaming API is not supposed to be LockerService-friendly. 

It complains at: "var cometd = new window.org.cometd.CometD();"

Specifically, it doesn't like "window.org."

Is there any way around this?
 
Greetings!

I am still new to this and I am trying to add a MultiselectPicklist visualforce component into a lightning component using the following syntax: 
<c:MultiselectPicklist leftLabel="Available Contacts"
                leftOptions="{!allContacts}"
                rightLabel="Selected Contacts"
                rightOptions="{!selectedContacts}"
                size="14"
                width="150px"/>

The error within my lightning app reads: "Failed to save undefined: No COMPONENT named markup://c:MultiselectPicklist found : [markup://c:OpportunityTeamBox]"

The Multiselect Picklist is installed as a package. 

From what I understand, using a component in lightning follows a similar syntax to using a component in visualforce. A lightning developer, I'm sure, will instantly be able to spot the problem, but I'm not able to search for a solution to being able to use a multiselect picklist in lightning. 

If anybody has suggestions, I would be happy to see 'em. 
Greetings! I'm at it again. This time, I have working code. 

The problem is: 
"Challenge Not yet complete... here's what's wrong: 
The campingList component isn't iterating the array of 'items' and creating 'campingListItem' components."

So for starters, I can say that it is. 
My campingList component contains this code. 
<aura:iteration items="{!v.items}" var="item">
     <c:campingListItem campingListItem="{!item}"/>
</aura:iteration>
I don't know how it could possibly resolve this problem any better than "correct." I know that it's iterating through them because:
 evidence
^This is after a couple of entries. 

Is this a common problem? Does anybody else have experience with this? I didn't post all of my code to keep this as short as possible. If required, I can certainly do so. 

Additionally, the entirety of the code that generates this is directly from the Trailhead example... copy/paste, but with the variable names renamed appropriately. If my code fails to meet their criteria, then so does theirs. 
I am working with a Lightning Component Trailhead example: https://trailhead.salesforce.com/lex_dev_lc_basics/lex_dev_lc_basics_forms

Don't worry about providing a free "passing grade," this is just the copy/pasted provided example. I wish to understand this prior to moving to the challenge. 

The components and controller and helper are as follows: 
expenseApp.app (provides the styles correctly):
<aura:application >
    <ltng:require styles="{!$Resource.SLDS +
         '/assets/styles/salesforce-lightning-design-system-ltng.css'}"/>
    <div class="slds">
        <c:expenses />
    </div>
</aura:application>

expenses.cmp: 
<aura:component >
    <aura:attribute name="newExpense" type="Expense__c"
                    default="{ 'sobjectType': 'Expense__c',
                             'Name': '',
                             'Amount__c': 0,
                             'Client__c': '',
                             'Date__c': '',
                             'Reimbursed__c': false }"/>
    <div class="slds-page-header" role="banner">
        <div class="slds-grid">
            <div class="slds-col">
                <p class="slds-text-heading--label">Expenses</p>
                <h1 class="slds-text-heading--medium">My Expenses</h1>
            </div>
        </div>
    </div>
    <!-- / PAGE HEADER -->
    <!-- NEW EXPENSE FORM -->
    <div class="slds-col slds-col--padded slds-p-top--large">
        <!-- [[ expense form goes here ]] -->
    </div>
    <div class="slds-col slds-col--padded slds-p-top--large">
        <div aria-labelledby="newexpenseform">
            <!-- BOXED AREA -->
            <fieldset class="slds-box slds-theme--default slds-container--small">
                <legend id="newexpenseform" class="slds-text-heading--small 
                                                   slds-p-vertical--medium">
                    Add Expense
                </legend>
                <!-- CREATE NEW EXPENSE FORM -->
                <form class="slds-form--stacked">
                    <div class="slds-form-element slds-is-required">
                        <div class="slds-form-element__control">
                            <ui:inputText aura:id="expname" label="Expense Name"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Name}"
                                          required="true"/>
                        </div>
                    </div>
                    <div class="slds-form-element slds-is-required">
                        <div class="slds-form-element__control">
                            <ui:inputNumber aura:id="amount" label="Amount"
                                            class="slds-input"
                                            labelClass="slds-form-element__label"
                                            value="{!v.newExpense.Amount__c}"
                                            required="true"/>
                            
                        </div>
                    </div>
                    <div class="slds-form-element">
                        <div class="slds-form-element__control">
                            <ui:inputText aura:id="client" label="Client"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Client__c}"
                                          placeholder="ABC Co."/>
                        </div>
                    </div>
                    <div class="slds-form-element">
                        <div class="slds-form-element__control">
                            <ui:inputDate aura:id="expdate" label="Expense Date"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Date__c}"
                                          displayDatePicker="true"/>
                        </div>
                    </div>
                    <div class="slds-form-element">
                        <ui:inputCheckbox aura:id="reimbursed" label="Reimbursed?"
                                          class="slds-checkbox"
                                          labelClass="slds-form-element__label"
                                          value="{!v.newExpense.Reimbursed__c}"/>
                    </div>
                    <div class="slds-form-element">
                        <ui:button label="Create Expense"
                                   class="slds-button slds-button--brand"
                                   press="{!c.clickCreateExpense}"/>
                    </div>
                </form>
                <!-- / CREATE NEW EXPENSE FORM -->
            </fieldset>
            <!-- / BOXED AREA -->
        </div>
        <!-- / CREATE NEW EXPENSE -->
    </div>
    <!-- / NEW EXPENSE FORM -->
	<br/>
    <c:expensesList expenses="{!v.expenses}"/>
</aura:component>

expensesController.js: 
({
    clickCreateExpense: function(component, event, helper) {

        // Simplistic error checking
        var validExpense = true;

        // Name must not be blank
        var nameField = component.find("expname");
        var expname = nameField.get("v.value");
        if ($A.util.isEmpty(expname)){
            validExpense = false;
            nameField.set("v.errors", [{message:"Expense name can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }

        // ... hint: more error checking here ...

        // If we pass error checking, do some real work
        if(validExpense){
            // Create the new expense
            var newExpense = component.get("v.newExpense");
            console.log("Create expense: " + JSON.stringify(newExpense));
            helper.createExpense(component, newExpense);
        }
    }
})

expensesHelper.js: 
({
    createExpense: function(component, expense) {
        var theExpenses = component.get("v.expenses");
        // Copy the expense to a new object
        // THIS IS A DISGUSTING, TEMPORARY HACK
        var newExpense = JSON.parse(JSON.stringify(expense));
 		console.log("Create expense is defined: " +JSON.stringify(newExpense)); 
        theExpenses.push(expense);
        component.set("v.expenses", theExpenses);
    }
})

expenseItem.cmp: 
<aura:component >

    <aura:attribute name="expense" type="Expense__c"/>

    <p>Amount:
        <ui:outputCurrency value="{!v.expense.Amount__c}"/>
    </p>
    <p>Client:
        <ui:outputText value="{!v.expense.Client__c}"/>
    </p>
    <p>Date:
        <ui:outputDate value="{!v.expense.Date__c}"/>
    </p>
    <p>Reimbursed?:
        <ui:outputCheckbox value="{!v.expense.Reimbursed__c}"/>
    </p>

</aura:component>

expensesList.cmp: 
<aura:component >
	<aura:attribute name="expenses" type="Expense__c[]" default ="{[v.firstExpense, v.firstExpense, v.firstExpense]}"/>
    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Expenses</h3>
        </header>
        
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.expenses}" var="expense">
                    <c:expenseItem expense="{!expense}"/>
                </aura:iteration>
            </div>
        </section>
    </div>
</aura:component>

The screen: 
lightning component
the error (when adding an item): 
User-added image

The console: 
User-added image

So it looks like there is a well-defined object that is intended to be pushed into the array. I tried to remove the JSON.stringify, prior to the push, but that created the same error. 

Any assistance would be helpful. 
 
Greetings!

I have a problem.

The Trailhead Lightning Developer challenge requirements are listed as: 
  • Create a compenent called campingListItem.
  • Add an attribute named item for type Camping_Item__c that is required.
  • Display the Name, Price, Quanity and Packed status using the appropriate output fields
My component within my developer org is called campingListItem. 

The code is here:
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" default="{ 'Name': 'asdf',
               'Price__c': '0',
               'Quantity__c': '3',
               'Packed__c': true
             }"/>
    <p>Name: <ui:outputText value="{!v.item.Name}" /> </p>
    <p>Price: <ui:outputCurrency value="{!v.item.Price__c}" /> </p>
    <p>Quantity: <ui:outputNumber value="{!v.item.Quantity__c}" /> </p>
    <p>Packed status: <ui:outputCheckbox value="{!v.item.Packed__c}" /> </p>
</aura:component>

I have tried both uninstantiated and instantiated values for "item." I have tried with and without text descriptions of the items. This challenge will not validate as successful and I find the description itself mildly vague. 

What could I be doing wrong?

Thanks in advance, 
SomeForumGuy
Hi All , getting the error while completing this module. While my application is running correctly.

Error: Challenge Not yet complete... here's what's wrong: The campingList JavaScript helper isn't saving the new record to the database or adding it to the 'items' value provider.

I am copying code for the finding the bug.

Apex Class:
public class CampingListController {
	@auraenabled
    public static List<Camping_Item__c> getItems (){
        List<Camping_Item__c> CI = [select id, name,price__c,Quantity__c,Packed__c from Camping_Item__c ];
        return CI;
    }
    @auraenabled
    public static Camping_Item__c saveItem (Camping_Item__c CampingItem){
        insert campingItem;
        return campingItem;
    }
}
CampingList.cmp
<aura:component controller="CampingListController">
    <aura:handler name = "init" value="{!this}" action = "{!c.doInit}"/>
	<aura:attribute name="items" type="Camping_Item__c[]"/>
    <aura:attribute name="er" type="boolean" default="false"/>
    <aura:attribute name="newItem" type="Camping_Item__c"    default="{ 'sobjectType': 'Camping_Item__c',
                         'Name': '',
                         'Price__c': 0,
                         'Quantity__c': 0,                         
                         'Packed__c': false
                       }"/>
    <ui:inputText value="{!v.newItem.Name}" aura:id="name" label="name"/>
    <ui:inputCheckbox value="{!v.newItem.Packed__c}" aura:id="Packed" label="Packed"/>
    <ui:inputCurrency value="{!v.newItem.Price__c}"  aura:id="Price" label="Price"/>
    <ui:inputNumber value="{!v.newItem.Quantity__c}" aura:id="Quantity" label="Quantity"/>
    <ui:button label="Create Expense" press="{!c.CreateCamping}" aura:id="button"/>
    <br/>
	<aura:iteration items="{!v.items}" var="PerItem">
        
        <c:campingListItem item="{!PerItem}" />
    </aura:iteration>
</aura:component>
CampingList.js
({
	
    doInit  : function(component, event, helper) {
		var action = component.get("c.getItems");
        action.setCallback(this, function(response){
            var state = response.getState();
           
            if (component.isValid() && state === "SUCCESS") {
           
               
                component.set("v.items", response.getReturnValue());
                 
            }
        });
        
        $A.enqueueAction(action);
	},
    
    CreateCamping : function(component, event, helper){
        
        helper.validateFields (component,component.find("name"));
        helper.validateFields (component,component.find("Price"));
        helper.validateFields (component,component.find("Quantity"));
        if(component.get("v.er") === false)
        {
            var lstItems = component.get("v.items");
            var Item = component.get("v.newItem");
            console.log('Before:'+lstItems);
            lstItems.push(Item);
            helper.CreateCampaign(component,Item);
            component.set("v.items",lstItems);  
             console.log('After:'+lstItems);
            component.set("v.newItem",{ 'sobjectType': 'Camping_Item__c',
                'Name': '',
                'Quantity__c': 0,
                'Price__c': 0,
                'Packed__c': false });
           
        }
	}
    
    
})

CampingListHelper.js
({
	
    validateFields : function (component,field) {
        
        var nameField = field;
        console.log('yes:'+nameField);
        var expname = nameField.get("v.value"); 
        if ($A.util.isEmpty(expname)){
           component.set("v.er",true);
           nameField.set("v.errors", [{message:"this field can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }
    },
    
    CreateCampaign : function (component,Item){         
        var action = component.get("c.saveItem");
        action.setParams({"CampingItem":Item});
        action.setCallback(this,function(response){
            var state = response.getState();
            if (component.isValid() && state === "SUCCESS") {
                console.log('save');
            }
        });
       $A.enqueueAction(action);        
    }
})
campingListItem.cmp
 
<aura:component >
    
   
    <aura:attribute type="Camping_Item__c" name="item" required="true"/>
    Name:
    <ui:outputText value="{!v.item.Name}" /><br/>
    Packed:
    <ui:outputCheckbox value="{!v.item.Packed__c}" /><br/>
    Price:
    <ui:outputCurrency value="{!v.item.Price__c}" /><br/>
   
    Quantity:
     <ui:outputNumber value="{!v.item.Quantity__c}" /><br/>
    
    <ui:button label="Packed!"  press="{!c.packItem}" aura:id = "Button"/> <br/>
</aura:component>

campingListItem.js
({
	    
    packItem : function(component, event, helper) {
		var pack = component.get("v.item");
        pack.Packed__c = true;
        component.set("v.item",pack);
        var btnClicked = event.getSource();
        btnClicked.set("v.disabled",true);
        
	}
    
    
})


Help me out with it.

Thanks and Regards,
Sai Krishna Tavva.


 
Does anyone know why I am getting this error, when the process clearly exists and is active?

Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.
User-added image
public class ContactAndLeadSearch {
public static List<List<SObject>> searchContactsAndLeads(string FN)
{
    List<List<sObject>> searchList = [FIND 'FN' IN all fields 
RETURNING Contact(FirstName,LastName) ,Lead(FirstName,Lastname)];
//Contact[] searchContacts = (Contact[])searchList[0];
//Lead[] searchLeads = (Lead[])searchList[1];
return searchList;
   

}
}

Please someone correct this code ,, this one was nt fulfilling the challenge req.
Trailhead Module 3:  Create a formula field that determines the number of days between today and the last activity date for a case's account.
Your support team has asked for improved visibility on account activity level at the time they’re helping with customer issues. Specifically, when they’re looking at a case, they’d like to see an at-a-glance view of the number of days since the case’s related account was last active. Create the formula using these requirements.The formula should be on the Case object.
The formula should be of return type Number.
The formula should be named 'Days Since Last Update' and have a resulting API Name of 'Days_Since_Last_Update__c'.
The formula should return the number of days between the account’s Last Activity Date and today.

I created the following:

I created a new custom formula field with return type number and called Days Since Last Update.
I created this formula: Account.LastActivityDate - TODAY()

I get this error message:

Challenge not yet complete... here's what's wrong: 
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today

Can you please assist what I did wrong?  I'm not sure if my formula is even correct with the challenge.  Please help!

Thank you.
The challenge is:

You've been given a requirement to keep Contact addresses in sync with the Account they belong to. Use Process Builder to create a new process that updates all child Contact addresses when the address of the Account record is updated. This process:Can have any name.
Must be activated.
Must update Contact mailing address fields (Street, City, State, Post Code, Country) when the parent Account shipping address field values are updated.

I start with Accounts when records is created or edited.
Filter criteria where accounts shipping address (street, city, state, zip code) is changed (used "or" logic).

I am stuck on the next step "add action".  I started with action type "Update Records".
On objects, I can't seem to change Accounts to Contacts.  Why?
Project custom object records should only be seen by the owner of the record and users above the owner on the role hierarchy. However, for some Project records, the Training Coordinator must also have Read Only visibility to the Project record.

Create a custom picklist field on the Project object called “Priority” with the following values: High, Medium, and Low. Then create a criteria-based Sharing Rule for Project records where the Priority = High to share those records with the Training Coordinator role.

Hey community,

I'm struggling with the logic of the task...

To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.

A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.

The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)

Here is what I got so far:

AND(
 NOT(ISBLANK(MailingPostalCode)),
 MailingPostalCode  <>  Account.ShippingPostalCode )

I THINK I know how to see if the contact mailing zip is not the same as the account shipping zip, and only if the is not blank.

The part I am stuck on is if the "Contact records with no associated parent account can be added with any MaiilingPostalCode value"...

I don't know what to do with that.

Also, I am now getting the error message when I recheck challenge:

Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contact_must_be_in_Account_ZIP_Code: [] 


Double help, please.

Hi All,
I am developing a VF page completely built in JS. After performing some action, it should redirect to newly created sobject standard page. But found issue:

Load denied by X-Frame-Options: https://na3.salesforce.com/<ID> does not permit cross-origin framing.

Though I have not used any <iframe> in my page, I am getting the above error. When I checked the firebug, I found one auto generated <iframe>, looks like:

<iframe id="contentPane" name="contentPane" onload="initContentFrame('https://c.na3.visual.force.com/apex/MyVFPage?core.apexpages.devmode.url=1', true, false , 'https://na3.salesforce.com' );" src="/blank.html" style="width: 100%; height: 100%" title="Content Pane" frameborder="0"></iframe>

I really have no clue where from it comes, and why it resists me to redirect from JS.

So it will be very helpful for me if anybody would let me know the reason and solution.

Thanks
Per support instructions can someone disable click jack protection on this org?

https://org62.my.salesforce.com/0013000000ZmVOo

Customer request below....

I see that response now in my previous emails but thought it was an older comment - my mistake for misreading the time stamps. However, I'm not sure why this would require developer resources. The only change I'm trying to make is to be allowed to uncheck the "enable clickjack protection for non-setup Salesforce page" under the Security Controls -> Session Settings section. Here's a screenshot:

Inline image 1

Is this not a setting that your support team can switch on/off?

FYI, our vocalcom implementation engineer told me that this clickjack protection setting is what is preventing us from accessing certain features of their product within SalesForce. These features were accessible 2 weeks ago then suddenly became inaccessible, so vocalcom's assumption is that SalesForce support or engineers pushed out an update that changed our session settings (would have to have been within the last 2 weeks). If that is not the case please let me know so that I can attempt further troubleshooting with vocalcom.