• Amit Goyal
  • NEWBIE
  • 38 Points
  • Member since 2014
  • Project Manager - SalesForce
  • Confidential


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 21
    Replies
I have retrived the project and converted in SFDX format.
Have dont with the configuration changes whatever required.
When I am pushing the project to scratch org, i am getting the following issue:
Cannot read property 'getSourcePath' of undefined.

I have found that it's a known issue when we made changes in the source of SFDX Project but I am not making any changes in the source.
The thing which i could observe is when i am retrieving the project it's processing like:

=== Status
Status:  InProgress
jobid:  09S7F000001z7Y9UAI

=== Status
Status:  InProgress
jobid:  09S7F000001z7Y9UAI

=== Result
Status:  Succeeded
jobid:  09S7F000001z7Y9UAI

could it be something like getting changes in the source.
Please let me know if someone has some idea.

Thanks
I am getting Syntax error.  Missing ')' and Parent entity failed to deploy error because of that I am not able to push my project to scratch org.
Anyone has some idea.

Thanks in advance.
An error was encountered processing path: Community/mdapipkg/unpackaged/brandingSets/Example.brandingSet.
Because of this i am not able to get the project push in scratch organization. getting exception while pushing
communityTemplateDefinition-meta.xml  In field: defaultBrandingSet - no BrandingSet named Example found as convert is not processing the Example.brandingSet.

Any solution for this.
 
I am using Lookup component of Lightning Design System. Used Javascript to make it work but I am not getting the Record Suggestion like a combobox display. What are the consideration for working with Lookup Components.

Appreciate the early answers as the requirement is a bit critical an urgent.

Thanks in advance. 
Hi All,

when selecting an application from app launcher in lightning experience,
the tabs are not visible in verticle nevigation menu, how could I get this.
Any suggestions.

Thanks,
Amit Goyal
Hi All,

I have dispatched my jobs to GoCanvas using a Trigger and Future class throung dispatchItems API and the documentation they have provided us.
When I am dispatching jobs, I am getting OK Status with StatusCode:200 but not able to see the jobs in GoCanvas. Tried for a demo and have send lot of email and calls. The requirement is urgent.

Will be happy if someone could help.

Thanks in advance.
I am create a lookup or Master-Detail Relationship on Job__c with StandardObject WorkOrder, The Field got created successfully, I populated the value in the Lookup/MasterDetail field but When I am using that field in my Apex Controller or Triggers, I am getting error, Invalid Field on Job__c.

But I checked the API and Field already exist on the Job__c object itself. I checked that the Standard WorkOrder which is a newly introduced feature in Salesforce is Querable, Updatable etc like all other Standard Object.

Event I am using the Standard WorkOrder on another Custom Object, its functioning well there. What could be the reason. Please suggest or answer, Its a bit urgent.

Thanks,
Amit Goyal
Hi,

https://developer.salesforce.com/trailhead/lightning_design_system/lightning-design-system6

In the above mentioned topic, we have a question: Which of the following is true about the Tile component?
I selected the answer "A. It is a grouping of related information associated with a record." which is correct as per my study and knowledge. It display this answer as wrong. even i have selected all 4 answer 1 by 1 to get the badge but it displayed all answer as wrong.

Now I am not able to get the badge and even if I will earn the badge than I will get only 25 point from this badge.
Please suggest something what's wrong with this topic's challenge.

Thanks.
Hi,

I am creating ExpenseTracker Lightining App From the Lightning Developer Guide Summer15, When I am submit the record with Amount than its creating the record and when I am populating the other field Like Name or any than I am getting this issue.

I built this same App before with Winter15 Version that time the App were working fine but now I am getting the same exception "Uncaught error in actionCallback : Cannot read property 'namespace__Amount__c' of null" in that org too.

Please suggest some solution or cause of this issue.

Thanks,

Amit Goyal
Like we could bind the fields of some object through DescribeSchema or FieldSet, Could we bind the StandardController dynamically?
 
I have found a issue or whatever which is not clear to me.
I have a trigger on Account on Before Insert and Before update events. and code is as follows.
DateTime_Field__c field is a DateTime field. My System date is 1/23/2015 2:24 PM.

trigger AccountAddressTrigger on Account (before insert, before update) {
    for(Account acc: Trigger.New){
        acc.DateTime_Field__c = System.today() + 7;
    }
}

Issue:
When I am assigning System.Now() + 7, Its assigning the date 1/30/2015 4:00 PM
When I am assigning System.Today() + 7, Its assigning the date 1/29/2015 4:00 PM

I tried the same with my other laptop and other developer account, with System.Today() + 2, and System.Now() + 2
The DateTime_Field = System.Today() + Integer_Value; always assigning the date Expected - 1.

What could be the reason.
I could not access my Test Class Methods in my Developer Edition Account Like Test.StartTest(), Test.StopTest() or Test.setCurrentPage() methods, I could be able to do it before but from today only when I am saving the test class with this methods its giving me compile time errors and the test classes in which I have used it earlier. Its throwing exception at run test.

What could be the reason.
I could not access my Test Class Methods in my Developer Edition Account Like Test.StartTest(), Test.StopTest() or Test.setCurrentPage() methods, I could be able to do it before but from today only when I am saving the test class with this methods its giving me compile time errors and the test classes in which I have used it earlier. Its throwing exception at run test.

What could be the reason.
I am getting Syntax error.  Missing ')' and Parent entity failed to deploy error because of that I am not able to push my project to scratch org.
Anyone has some idea.

Thanks in advance.
the conversion was successful on my meta data from my  org, but when I do this command
 
sfdx force:source:push -u my-scratch-org
I get this error: Cannot read property 'getSourcePath' of undefined.

What could be the problem?

 
I'm having an issue with Spring '07 Lightning Application Events. It seems that handlers of an application event are being notified multiple times for a single firing of the event. This can be replicated on various browsers. 

How to reproduce the error:
1) Create the below components and put them in a new lightning page for an object of your choice. 
2) Assign that page to a profile, app or org
3) Navigate to that object's list view and then drill down to the newly created page
4) Press the button. The console should show this:
Test2 receiving event
Test1 receiving event

5) Navigate back to the list view and drill down on another record
6) Press the button. The console should show this:
Test2 receiving event
Test1 receiving event
Test2 receiving event
Test1 receiving event

7) If you repeat steps 5 and 6, you will get an additional two lines in the console for each time you repeat the process. I.e., one firing of the event is causing the handlers to be notified multiple times. 

Incidentally, I don't have this problem in the community edition. It's only in the base lightning experience version that it crops up. Can anyone replicate this? Thanks. 

Component #1
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:handler event="c:pvStateControlEvt" action="{!c.receiveEvent}"  phase="default" />
    <aura:registerEvent name="stateControlEvent" type="c:pvStateControlEvt"/>

I send and receive events
            <lightning:button label="sendEvent" aura:id="testButton" onclick="{!c.fireEvent}"/>

</aura:component>

Component #1 controller
({
fireEvent : function(component, event, helper) {
       var theEvent = $A.get("e.c:pvStateControlEvt");
        theEvent.fire();

},
receiveEvent : function(component, event, helper) {
        console.log("Test1 receiving event");
    }
})


Component #2
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:handler event="c:pvStateControlEvt" action="{!c.receiveEvent}"  phase="default" />
    I receive events
</aura:component>

Component #2 controller
({
receiveEvent : function(component, event, helper) {
        console.log("Test2 receiving event");
    }
})

Event pvStateControlEvt
 
<aura:event type="APPLICATION" description="My event" >
        <aura:attribute name="myAttribute" type="String"/>
</aura:event>

 
Challenge - Create a form to enter new items and display the list of items entered. To make our camping list look more appealing, change the campingHeader component to use the SLDS. Similar to the unit, style the Camping List H1 inside the slds-page-header. Modify the campingList component to contain an input form and an iteration of campingListItem components for displaying the items entered.
The component requires an attribute named items with the type of an array of camping item custom objects.
The component requires an attribute named newItem of type Camping_Item__c with default quantity and price values of 0.
The component displays the Name, Quantity, Price, and Packed form fields with the appropriate input component types and values from the newItem attribute.
The JavaScript controller checks to ensure that the Name, Quantity and Price values submitted are not null.
If the form is valid, the JavaScript controller pushes the newItem onto the array of existing items, triggers the notification that the items value provider has changed, and resets the newItem value provider with a blank sObjectType of Camping_Item__c.


My answer - 
<aura:component >
<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}"/>
 <p>Name:
        <ui:inputText value="{!v.newitem.name}"/>
    </p>    
  <p>Packed:
        <ui:inputCheckbox value="{!v.newitem.Packed__c}"/>
     
    </p>    
  <p>Price:
        <ui:inputCurrency value="{!v.newitem.Price__c}"/>
    </p>
    <p>Quantity:
        <ui:inputNumber value="{!v.newitem.Quantity__c}"/>
    </p>
</aura:component>


Error -

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

Please share the correct solution.
I am create a lookup or Master-Detail Relationship on Job__c with StandardObject WorkOrder, The Field got created successfully, I populated the value in the Lookup/MasterDetail field but When I am using that field in my Apex Controller or Triggers, I am getting error, Invalid Field on Job__c.

But I checked the API and Field already exist on the Job__c object itself. I checked that the Standard WorkOrder which is a newly introduced feature in Salesforce is Querable, Updatable etc like all other Standard Object.

Event I am using the Standard WorkOrder on another Custom Object, its functioning well there. What could be the reason. Please suggest or answer, Its a bit urgent.

Thanks,
Amit Goyal
AccountsController.apxc
public class AccountsController {
    @AuraEnabled public static Account          getAccount(){
        return (Account) Database.query( ' SELECT Name,Type,NumberOfEmployees,TickerSymbol,Phone FROM Account  ' )[0];
    }
    @AuraEnabled public static Account          saveAccount(Account account){
        upsert account;
        return account;
    } 
}

AccountsListController.js
({
    init : function(component, event, helper) {
        console.log('init');
        var action2 = component.get("c.getAccount");        
        action2.setCallback(this, function(response) {
            console.log(response.getReturnValue());
            component.set("v.account", response.getReturnValue());
        });
        $A.enqueueAction(action2);
    }, 
    save : function(component, event, helper) {
        console.log('save:1');
        var action = component.get("c.saveAccount");
        var account = component.get("v.account");
        action.setParams({"account": account});
        action.setCallback(this, function() {  console.log('SAVED.');  } );
        $A.enqueueAction(action);
        console.log('save:end');
    },
})

({
   //Fetch the accounts from the Apex controller
  getAccountList: function(component) {
    var action = component.get("c.getAccounts");

    //Set up the callback
    var self = this;
    action.setCallback(this, function(actionResult) {
        component.set("v.accounts", actionResult.getReturnValue());            
    });
    $A.enqueueAction(action);
  }   
})

AccountList.cmp
<aura:component controller="AccountsController" implements="forceCommunity:availableForAllPageTypes">
    <aura:handler name="init" value="{!this}" action="{!c.init}"/>
    <aura:attribute name="account"  type="Account" />
    <h1>Test</h1>
    <form>
         
        <ui:inputText aura:id="client"
            label="{!$ObjectType.Account.fields.Name.Label}"
            class="form-control"
            value="{!v.account.Name}"
            placeholder="Name"
        />
        <ui:inputText aura:id="client"
            label="{!$ObjectType.Account.fields.Type.Label}"
            class="form-control"
            value="{!v.account.Type}"
            placeholder="Type"
        />
        <ui:inputText aura:id="client"
            label="{!$ObjectType.Account.fields.NumberOfEmployees.Label}"
            class="form-control"
            value="{!v.account.NumberOfEmployees}"
            placeholder="NumberOfEmployees"
        />
        <ui:inputText aura:id="client"
            label="{!$ObjectType.Account.fields.TickerSymbol.Label}"
            class="form-control"
            value="{!v.account.TickerSymbol}"
            placeholder="TickerSymbol"
        />
        <ui:inputText aura:id="client"
            label="{!$ObjectType.Account.fields.Phone.Label}"
            class="form-control"
            value="{!v.account.Phone}"
            placeholder="Phone"
        />
        <br />
        <ui:button class="form-control" aura:id="button" label="Save" press="{!c.save}"/>
        <br />
    <br />
       
    </form>
</aura:component>
 
Hi,

Do you know if it is possible to deep link a custom tab on the left hand navigation?

In my web app I allow the user to login through SSO from Salesforce ( so I use salesforce as authentication provider ), than when the user credentials are ensured i redirect the user to the tab using an aspex url like the following: 

https://{domain}/apex/{VisualforceTabsName}?sfdc.tabName={VisualforceTabsRef}

or a servlet integration link like the following:

https://na15.salesforce.com/servlet/servlet.Integration?lid={lid}&ic=1&linkToken={linkToken}

I got those links simply right clicking the tabs and copy the link, now this is not going to work on the new ligthening experience where the link is something like the following;

https://gs0.lightning.force.com/one/one.app?source=aloha#{token}

Now it seems to me that the token in this case is user specific, so it can't be used as high level reference to the Visualforce tab.

Do you know if there is a way to do the same in the Lightening Experience (Spring 16' release)? Or if there is a different way to achieve the same result?

Thanks
Hi,
I need to distinguish whether the user is in Classic vs Lightning mode. I am following the suggestion in trailhead topic: Sharing Visualforce
Pages Between Classic and Lightning Experience which is the javascript code below. I am using Winter 16 Lightning mode. However, sforce.one shows up undefined.  Am I missing anything?  Has anyone encountered this?  Thanks.

function isLightningExperienceOrSalesforce1() {
    return((typeof sforce != 'undefined') && sforce && (!!sforce.one));
}
if( isLightningExperienceOrSalesforce1() ) {
    // Do something for Lightning Experience
}
else {
    // Use classic Visualforce
}
How can I auto lauch a visual force page in Lightning from an action button that calls a controller and redirects to a custom object and stays in lightning?  I need all this to happen in one click.

We currently have a process that takes the values from the opportunity and populates a custom object.  This process uses field ID's to map the values to a custom object.  The existing button does not appear in "Lightning Experience."  The only way that is obvious to accomplish this task in the "Lightning Experience" is to utilize a visual force page. The user should click a Lightning Experience "Action" button.  The page should launch automatically, execute code in the controller and return to the visual force page to "navigatetoSObject."   It is important that the user has a limited number of clicks that they have to execute.  The "navigatetoSObject" is necessary so the user is not forced back into "Salesforce Classic" mode.  If a PageReference is executed in the controller "Salesforce Classic" appears even though the user has chosen to be in the "Lightning Experience." 


 
  • December 28, 2016
  • Like
  • 0
Login into User account in Lightning Builder App making me log out of the lightning app and taking me to the account login page and after logging taking me to classic page? 
Hi all,

I`m struggling to fix an issue which arise with the new Salesforce Lightning Experience. So, I have a Visualforce page which is assigned to the Edit functionality of Accounts. In Salesforce Classic mode everything works perfectly good, but when I switch to the new Lightning Experience I get a strange behavior on redirect - the lightning is removed and I get redirected to the classic mode page. I hope to clarify things with the below screenshots.

First, I edit one of my accounts to go to my Visualforce page.
User-added image

First, I edit one of my accounts to go to my Visualforce page.
User-added image

First, I edit one of my accounts to go to my Visualforce page.User-added image

I'm using PageReference object in my Apex controller for navigation, but from what I've red it is not working with the Lightning.
For example:
 
    PageReference pg = null;
    try{
        pg = stdController.save();  
    }catch(Exception ex){           
        Logger.Instance.LogException(ex, false);
    }

    return pg;
If anyone can give me directions, I would be very grateful!
 
Hi All,

I am trying to connect to a SAP server via lightning connect for this I have done follwoing,
1. Set up external Data source with lightning connect odata2.0
2. Given the endpoint URL (Odata service exposed by SAP NG)
3. Set up SAP end points for Auth.Provider as a Open ID connect (authorization ednpoint and token end points provided by SAP NG)
4. Set this up with Named Principal under External data source (created above) and authentication type as Oauth 2.0

But I am geting a error description as this
https://mydomain.my.salesforce.com/_nc_external/identity/sso/ui/AuthorizationError?ErrorCode=No_Oauth_Token&ErrorDescription=invalid_client+No+OAuth+2.0+client+authentication+credentials+included+or+used+authentication+method+is+unsupported.+Supported+authentication+methods+are+specified+in+the+ICF+service+configuration+for+the+token+endpoint+in+transaction+SICF

Can somebody please help me on this. Not able to understand what I am doing wrong here as all of the things here are configuration item in salesforce
Like we could bind the fields of some object through DescribeSchema or FieldSet, Could we bind the StandardController dynamically?
 
This is to solve one of the trailhead challenge. 

How do we assign multiple values to an attribute by not using default paramenter instead value parameter. For example.

I have a component as below.

<aura:component name="DayOfTheWeek" type="string" value="Monday" : "Tuesday" : "Wednesday">

and I would like to read these values and find the week of the day dynamically, as we have $Browser and $Locale, do we have another binding variable to check on day, date and time values.

Thanks.
I'm doing the simple lightning components challenge and have hit this problem in my existing trailhead org and a brand new dev org that I've just created:

Challenge not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: QVWBQHAG
Hi,
Are there UI components that handle lookup field selection, for example lookup from my custom object to an account? From experience this takes a lot of effort to implement and would seem like a very common use case. Maybe there is an open source version?

Thanks

Hello Guys,

I am using twitter bootstrap in my VF pages for making UI more professional and also using certain components to show Progress bars and all.
But i am facing issues with ShowHeader and StandardStyleSheets=TRUE attributes in Apex:Page.The Bootstrap increases the font size of the sidebards and headers and it makes the page looking enirely different from other pages 

is there anyway by which we can apply bootstrap CSS only for selective Components  in our VF pages? I want to use ShowHeader=TRUE as it is the expectation from Customer. Please help me asap !