• Shubham Sonar
  • NEWBIE
  • 35 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies
Hi all,

  This is something where I have been through some related articles and help docs. But unable to make a concrete conculsion out of it. I have made a managed package wherein I have two permission sets which share CRU DML permission on Case object and a Case record type that I have added to the package. But when installed it only gives field level access and not the record type/ CRU permission. I do tried uploading a new version and upgrade but still didn't changed anything.

Apreciate your time in advance. Thanks
I have inserted datepicker of jquery but it is not working in chrome browser?
I am trying to fetching my force.com site domain I have created. Gone through lot of internet contents but find no where a solution to fetch the complete Domain/Default site url. Possible is to query urlPathPrefix and salesforce.com domain, but not the complete force.com domain I have created.

for example: ***-developer-edition.ap2.force.com
                   ***-developer-edition.na3.force.com
                   ***-developer-edition.XYZ.force.com

could be fetched properly!
I used the same code as given on trailhead, but either the method that needs to add a record is not getting called or maybe some other reason. The createExpense method is unable to create new Expense in SF object. Can anybody help me out?

Controller.js:
clickCreateExpense: function(component, event, helper) {
        if(helper.validateExpenseForm(component)){
            // Create the new expense
            var newExpense = component.get("v.newExpense");
            helper.createExpense(component, newExpense);
        }
    }

Helper.js:

createExpense: function(component, expense) {
         var action = component.get("c.saveExpense"); // call to controller method
        //set parameter value of that controller
        action.setParams({ "expense": expense });
        
        action.setCallback(this, function(response){
            var state = response.getState();
            
            if (component.isValid() && state === "SUCCESS") {
                var expenses = component.get("v.expenses");
                expenses.push(response.getReturnValue());
                component.set("v.expenses", expenses);
            }
    });
    $A.enqueueAction(action);
Apex Controller:
@AuraEnabled
    public static Expense__c saveExpense(Expense__c expense) {
        system.debug('saveExpense');
        // Perform isUpdatable() checking first, then
        upsert expense;
        return expense;
    }


 
I am using number of objects in my app which are inter-related to each other. Whereas the controllers have good frequency of methods around it. Every time i create a test class and test method for testing any controller method, i need to create new Records which are required for the execution of controller methods. Is there any way to create a class which provides me all types of required records. Something like a data factory class which can be used in every test class during test execution.
hello all,
     I am sharing some useful information between VF pages using PageReference getParameters. I am finding it bit risky to do all operations using the url parameters. For example:  the url: my.saleforce.com/deletePage?idToDelete=a0d00asdsdfgyXas is used to delete a record. But is there any way to make url unintelligible(as well as pretty) or a way to pass data between pages without addinng the ids to url.
Hi everyone,

I am learning Salesforce from April 2017. I learned Apex and VF. I wrote triggers. But still I am feeling like I am lacking somewhere. I lost many interviews. 
I can read codes and undestand the meaning.I paid money for online classes for salesforce but all waste(may be my wrong) also i learned from plural website but that also couldnt help. I believe just to learn few codes is not enough to crack the inetrview. As I am from non coding background(even though I am a btech in IT) I understand I will take time to learn and understand things. If I get new a question interview with diferent conditions I couldn't map the things properly. 

Still I want to learn, can anybody direct me how to design the condition in mind to code and if there is a way I can learn online I am ready to do so.

I hoping for best helping answers here because I know in this community we have sound developers and coders. In the begining they may be facing same issues. Waiting for your helps.

Thanks in Advance.
Wish you all a very happy & prosperous new year 2018.
Regards,
Anjali
I am trying to fetching my force.com site domain I have created. Gone through lot of internet contents but find no where a solution to fetch the complete Domain/Default site url. Possible is to query urlPathPrefix and salesforce.com domain, but not the complete force.com domain I have created.

for example: ***-developer-edition.ap2.force.com
                   ***-developer-edition.na3.force.com
                   ***-developer-edition.XYZ.force.com

could be fetched properly!
hello all,
     I am sharing some useful information between VF pages using PageReference getParameters. I am finding it bit risky to do all operations using the url parameters. For example:  the url: my.saleforce.com/deletePage?idToDelete=a0d00asdsdfgyXas is used to delete a record. But is there any way to make url unintelligible(as well as pretty) or a way to pass data between pages without addinng the ids to url.

I'm hoping people can think me through a bit of a pickle I've gotten myself into. I have a custom controller for a relatively non-standard Visualforce page that simply iterates through HTTP POST or GET parameters and looks for specific patterns. In a nutshell, the action in question looks like this:

      public PageReference reconcile() {
            // get request parameters
            Map<String, String> parameters = ApexPages.currentPage().getParameters();
            for (String pName: parameters.keySet()) {
                    String pVal = parameters.get(pName);
                    System.debug('PARAM NAME: ' + pName + ' PARAM VAL:' + pVal);
                    
                    // parse the Assessment ID out of the parameter name
                    if (pName.contains('reconcile')) {
                        String assesmentId = pName.replace('reconcile', '');
                        System.debug('RECONCILING ASSESSMENT ID: ' + assesmentId);
                        
// ...work gets done here
                        }                                    
                    }
            }
}

 

So rather than storing state in the controller, I work iteratively. But now I'm having trouble achieving code coverage. My unit test looks something like this:

 

 

       PageRef pageRef = Page.ReconcilePayments; // this is the page my controller is attached to
       Test.setCurrentPage(pageRef);
       ReconcilePaymentController recController = new ReconcilePaymentController();
       System.assert(recController != null);

Now, I can call the reconcile() action directly, but in order to achieve test coverage (and, more importantly,  a good meaningful test) I need to include the parameters and I don't see a way to do that in the pageRef methods...pageRef seems to represent the result of invoking a page, and does not include the request.

 

How would you approach getting this unit test done?