• Lucas Calegari
  • NEWBIE
  • 45 Points
  • Member since 2017
  • Salesforce Developer

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 13
    Replies
Hello

I'm trying to use a Sytem method as in 

String networkId = System.getNetworkId();
but I cannot save it. I get an error. The documentation for the class shows that its supposed to return a string. Any ideas.

Error: Compile Error: Method does not exist or incorrect signature: void getNetworkId() from the type System 

Thanks

john
 
  • June 18, 2017
  • Like
  • 0
Hey guys,

It's my first time working with the Einstein API through the Trailhead "Einstein Intent API Basics""

I've built the Dataset, and now i'm generating a model by requesting a training to the https://api.einstein.ai/v2/language/train

But when I check the status of my Model creation, the Status is always QUEUED.

How long usually does it take to the model be complete?

Best,
Lucas.
Hey guys,

It's my first time working with the Einstein API through the Trailhead "Einstein Intent API Basics""

I've built the Dataset, and now i'm generating a model by requesting a training to the https://api.einstein.ai/v2/language/train

But when I check the status of my Model creation, the Status is always QUEUED.

How long usually does it take to the model be complete?

Best,
Lucas.
I'm on the Quick Start: Einstein Prediction Builder module and have followed the steps and created an account to get the Einstein Prediction Builder Developer Edition, however after verifying my email and loggin on, I can't find the prediction builder tool in setup as it says you would on Trailhead. Where can I use a version and play around with the tool?
 
I got this question wrong on a practice exam I took on proprofs.com. Can some please help me understand why this is so? Here is a screenshot of the question. 
proprofs.com
I'm trying to complete the Handle Record Changes and Errors module but can't seem to get past the following challenge error:
Challenge Not yet complete... here's what's wrong: 
The 'accEdit' Lightning Component JS Controller does not appear to be setting 'v.recordSaveError' with an error message.

.I've tried many different combinations of sets and am not having much luck.

I've tried several different component.set methods such as this one:
component.set('v.recordSaveError','Error: ' + saveResult.state + ', message: ' + JSON.stringify(saveResult.error));

Any ideas what this module is looking for as a valid solution?

I do see recordSaveError display after being set due to an error.

Thanks.
 
Hello

I'm trying to use a Sytem method as in 

String networkId = System.getNetworkId();
but I cannot save it. I get an error. The documentation for the class shows that its supposed to return a string. Any ideas.

Error: Compile Error: Method does not exist or incorrect signature: void getNetworkId() from the type System 

Thanks

john
 
  • June 18, 2017
  • Like
  • 0
Hi,
I am preparing for Developer 1 exam. As I am confused with below questions, it would be much helpful to find out the correct answer for them. My Answers are menioned in the brackets.

1.  Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers.
             A.Create activities at multiple intervals.   (ANS)
             B. Send an outbound message without Apex code. (ANS)
            C. Copy an account address to its contacts.
            D. Submit a contract for approval.

2.  How can a developer refer to, or instantiate, a PageReference in Apex? Choose 2 answers
           A. By using a PageReference with a partial or full URL. (ANS)
           B. By using the Page object and a Visualforce page name. (ANS)
           C. By using the ApexPages.Page() method with a Visualforce page name.  
           D. By using the PageReference.Page() method with a partial or full URL.

3.  A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user Inputs across multiple Visualforce pages and from a parameter on the initial URL. Which statement is unnecessary inside the unit test for the custom controller?
            A. public ExtendedController(ApexPages.StandardController cntri) { }  
            B. ApexPages.currentPage().getParameters() put('input', 'TestValue);
            C. Test.setCurrentPage(pageRef);
            D. String nextPage = controller.save().getUrl(); (ANS)

4. A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case Status field are on a custom visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? Choose 2 answers

           A. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues(). (ANS)
           B. Use Schema.RecordTypelnfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
           C. Use SOQL to query Case records in the org to get all the RecordType values available for Case.  (ANS)
           D. Use SOQL to query Case records In the org to get all value for the Status pickiest field.

5. An sObject named Application _c has a lookup relationship to another sObject named Position_c. Both Application _c and Position c have a picklist field named Status_c. When the Status c field on Position __c is updated, the Status_c field on Application _c needs to be populated automatically with the same value, and execute a workflow rule on Application c. Flow can a developer accomplish this?

      A. By changing Application c.Status_c into a roll-up summary field.
      B. By changing Application c.Status_c into a formula field.  (ANS)
      C. By using an Apex trigger with a DML operation.
       D. By configuring a cross-object field update with a workflow.

6. )   Which type of code represents the Controller in MVC architecture on the Force.com platform? Choose 2 answers

        A.JavaScript that is used to make a menu item display itself.
        B. StandardController system methods that are referenced by Visualforce.(ANS)
        C. Custom Apex and JavaScript code that is used to manipulate data. (ANS)
        D. A static resource that contains CSS and images.

7. A developer needs to provide a Visualforce page that lets users enter Product-specific details during a Sales cycle. How can this be accomplished? Choose 2 answers

            A. Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify.
            B. Create a new Visualforce page and an Apex controller to provide Product data entry.  (ANS)
            C. Copy the standard page and then make a new Visualforce page for Product data entry.
            D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.  (ANS)

8.  The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-detail relationship up to the Position_ object. The relationship field names are based on the auto-populated defaults What is the recommended way to display field data from the related Review_c records on a Visualforce for a single Position_c record?

          A. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.
          B. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data.
          C. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review c data through the Job_Application_c object.
          D. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.   (ANS)

9.  On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?
             A. Use the constructor method for the controller.   (ANS)
             B. Use the $Action.View method in the Visualforce page.
             C. Create a new PageReference object with the Id.
             D. Use the <apex:detail> tag in the Visualforce page.

10. A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?
           A. By using ApexMessage.Message() to display an error message after the number of DML statements is excel
           B. By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded.
            C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
             D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded. (ANS)


Thanks Much for the help in Advance
Regards,
Reshmi
Hi,

I have a soql query where i am using LIKE operator.
String sql = 'Select Name From Account WHERE Name LIKE \'%' + searchKeyword + '%\'';
Here 'searchKeyword' variable holds values like 'Test 1, Test 2, Test 3, Test 4'.
When i search a Name in my VF page which is a Textbox, like this 'Test 1, Test 4' its not returning the searchKeyword values. Because LIKE operator searches values only in Orderwise. It cant search middle values.

Is there any possible solution where it searches all values that are contained in the textbox?

Thanks
Vivek
1)The Review_c object have a lookup relationship to the job_Application_c object.The job_Application_c object has a master detail relationship up to the
 position_c object.The relationship is based on the auto populated defaults? 
 What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?
 
 A.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
 B.Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _ C data.
 C.Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through me Job_Applicacion_c inject.
 D.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.


2)A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce. 
  Which kind of relationship would a developer use to relate the Account to Warehouse?
 
  A. Lookup
  B. One to Many
  C. Master-Detail
  d. Parent-Child


3)A developer wants to create a custom object to track Customer Invoices. 
  How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account?

A. The Invoice should have a Master-Detail relationship to the Account
B. The Account should have a Master-Detail relationship to the Invoice.

4)What should a developer working in a sandbox use to exercise a new test class before the developer deploys that test class to production? Choose 2 answers
  
 A.The REST API and ApexTestRun method
 B.The Run Tests page in Salesforce Setup
 C.The Apex Test Execution page in Salesforce Setup
 D.The Test menu in the Developer Console
 
Hello,

In order to grab custom field IDs, I added a tooling API query. Any profile without "View All Data" gets the following response for HTTP Request.
The standard profile does have API enabled permission and full CRED access on any involved object. The Apex class has "Without Sharing" tag as well.

CALLOUT_RESPONSE|[58]|System.HttpResponse[Status=Bad Request, StatusCode=400]

Sample Code:
 
String query = 'SELECT Id From CustomObject Where DeveloperName = \'' + objectName + '\'';
        String endpoint = Url.getSalesforceBaseUrl().toExternalForm();
        endpoint += '/services/data/v29.0/tooling/query/?q=';
        endpoint += EncodingUtil.urlEncode(query, 'UTF-8');
        
        HttpRequest request = new HttpRequest();
        request.setMethod('GET');
        request.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId());

I need to either:

1. Adjust the non-system admin profile, so that its SessionId gets a proper response like a profile with "View All Data" e.g system admin.
2. Somehow use a sessionId that doesnt belong to current session's profile holder. Use a system admin's sessionid WITHOUT embedding their username and password anywhere.
3. Get further debugging information from the HTTP response. I am not really sure about the specifics of why its a "bad request".


Any guidance would be appreciated. Thanks
Which statement about changeset deployments is accurate? Choose 3 answers

1. They require a deployment connection
2. They can be used only between related organisation
3. They use an all or non deployment model
4. They can be used to transfer contact records
5. They can be used to deploy custom settings data

Is it 1,2,3 or 1,2,5 ?

documentation states Custom settings but not custom settings data....Please clarify....

 
Hello,

In order to grab custom field IDs, I added a tooling API query. Any profile without "View All Data" gets the following response for HTTP Request.
The standard profile does have API enabled permission and full CRED access on any involved object. The Apex class has "Without Sharing" tag as well.

CALLOUT_RESPONSE|[58]|System.HttpResponse[Status=Bad Request, StatusCode=400]

Sample Code:
 
String query = 'SELECT Id From CustomObject Where DeveloperName = \'' + objectName + '\'';
        String endpoint = Url.getSalesforceBaseUrl().toExternalForm();
        endpoint += '/services/data/v29.0/tooling/query/?q=';
        endpoint += EncodingUtil.urlEncode(query, 'UTF-8');
        
        HttpRequest request = new HttpRequest();
        request.setMethod('GET');
        request.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId());

I need to either:

1. Adjust the non-system admin profile, so that its SessionId gets a proper response like a profile with "View All Data" e.g system admin.
2. Somehow use a sessionId that doesnt belong to current session's profile holder. Use a system admin's sessionid WITHOUT embedding their username and password anywhere.
3. Get further debugging information from the HTTP response. I am not really sure about the specifics of why its a "bad request".


Any guidance would be appreciated. Thanks