• VARUN GULATI 30
  • NEWBIE
  • 33 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 9
    Replies

Greetings Expert,

We are trying to Setup CI-CD  for our Org. However, while sfdx force:auth:jwt:grant on Jenkins, we are gettig the below error. Same command is working fine from local of 2 - 3 people. Jenkins is installed on UNIX based system:

+ sfdx force:auth:jwt:grant --clientid XXXXX --username XXXXX --jwtkeyfile XXXXX --setdefaultdevhubusername --instanceurl https://test.salesforce.com

ERROR: Command failed with response. - (secret-tool:20489): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY

Section from Jenkinsfile:

if (isUnix()) {
sh '''
export SFDX_USE_GENERIC_KEYCHAIN=true
echo Above Set Value: $SFDX_USE_GENERIC_KEYCHAIN
sfdx force:org:list
echo Shell is: $SHELL
which secret-tool
which sfdx
force:auth:jwt:grant --clientid XXXXX --username XXXXX --jwtkeyfile XXXXX --setdefaultdevhubusername --instanceurl https://test.salesforce.com '''
}

Any setting which we ccould apply on Jenkins server to resolve the Issue ?... Appreciate your assistance with this.

Greetings Experts,

I wish to create an XML and view on on a Button Click for fields of 2 Related Custom Objects:
Inspection: Master
Inspection Detail: Child

However, I am getting below Error while clicking on Button (Generate Certificate). Appreciate your help and guidance with this:

Attempt to de-reference a null object
Error is in expression '{!InspectionHierarchyInXML}' in component <apex:commandButton> in page inspectiondetail: Class.InspectionControllerExtension.InspectionHierarchyInXML: line 25, column 1
An unexpected error has occurred. Your development organization has been notified.

Here is a Visualforce Page that I have created:

<apex:page standardController="Inspection__c" extensions="InspectionControllerExtension" >
    <apex:form >
        <apex:pageBlock >
            <apex:detail relatedList="false"/>
            <apex:pageBlockSection >
                <apex:commandButton value="Generate Certificate" action="{!InspectionHierarchyInXML}"
                 rendered="{!IF(Inspection__c.Status__c == 'Pass',true,false)}" />
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock title="Inspection Items" mode="inlineEdit" >
            <apex:pageBlockButtons location="top">
                <apex:commandButton action="{!save}" value="Save" id="saveButton" />
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" />
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!Inspection_Checks}" var="item">
                <apex:column value="{!item.Product_Check_Name__c}" headerValue="Inspection Check Name"/>
                <apex:column headerValue="Inspection Check Status">
                    <apex:outputField value="{!item.Status__c}">
                        <apex:inlineEditSupport showOnEdit="saveButton,cancelButton"
                        hideOnEdit="editButton" event="ondblclick"
                        changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
                    </apex:outputField>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>

        /* Below is the Code for Auto Refresh on the Page */
        
        <apex:outputPanel id="refresh" rendered="true">
             <apex:outputPanel id="refresh1" rendered="{!refreshPage}">
              <script>
                   window.top.location='/{!Inspection__c.id}';
              </script>
             </apex:outputPanel>
        </apex:outputPanel>
    </apex:form>
</apex:page>


Also, below is the Custom Extension Class:

public class InspectionControllerExtension {

    public List<Inspection_Checks__c> Inspection_Checks {get;set;}

        public InspectionControllerExtension(ApexPages.StandardController controller) {
        Inspection_Checks = [select id,Product_Check_Name__c,Status__c from Inspection_Checks__c where Inspection__c =:controller.getId()];
    }
    
    public Boolean refreshPage {get; set;}
    
    public InspectionControllerExtension() {
        refreshPage=false;
    }
    
    public PageReference save() {
        update Inspection_Checks ;
        refreshPage=true;
        return null;
    }
    
    public ApexPages.StandardController myController;
    public PageReference InspectionHierarchyInXML() {
    
    //Id recordId = new Id();
    Id recordId = myController.getId();
    Dom.Document doc = new Dom.Document();    
    Dom.Xmlnode rootNode = doc.createRootElement('response', null, null);
    Inspection__c inspectionTarget = [ select  id, name, Opportunity__c, Product__c,
                           (select id, name from Inspection_Checks__r) from Inspection__c 
                                      where Id = :recordId ];
        
        Dom.Xmlnode accountNode = rootNode.addChildElement('Inspection__c', null, null);
        accountNode.setAttribute('id', inspectionTarget.Id);
        accountNode.setAttribute('name', inspectionTarget.Name);
        
        for (Inspection_Checks__c eachInspectionCheck : inspectionTarget.Inspection_Checks__r) {
            Dom.Xmlnode InspectionCheck = accountNode.addChildElement('Inspection_Checks__c', null, null);
            InspectionCheck.setAttribute('id', eachInspectionCheck.Id);
            InspectionCheck.setAttribute('name', eachInspectionCheck.Name);
        }

        System.debug(doc.toXmlString());
        return null;
}
    
}
Experts,

I am trying to follow the Trail: Use SOAP API (API Basics). I have been able to obtain a SessionID indicating that I don't have the TLS Issue. However, while creating an Account I am getting the below Response Error. Also, Please view my Request as well. I have gone throough various posts before reaching out to the community. Appreciate if someone can guide me to proceed on this:

Request URL: https://varun1-dev-ed.lightning.force.com/services/Soap/c/43.0

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:sessionId>00D7F000005lNL9!AQ8AQICf9bgDNa3sECRIMMILN4_3Sjl6UAcl1XoWI1EAgrZKkHXh63lyreVSrxWcTPuSK8NsPGUCrEvlm_ZciJFXXXXXXXXj</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--Zero or more repetitions:-->
            <Name>Bluebeards Grog House</Name>
            <Description>It is better than Blackbeards.</Description>
            </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
      <title>Error 405 Only POST allowed</title>
   </head>
   <body>
      <h2>HTTP ERROR 405</h2>
      <p>
         Problem accessing /services/Soap/c/43.0. Reason:
         <pre>Only POST allowed</pre>
      </p>
      <hr/>
      <i>
         <small>Powered by Jetty://</small>
      </i>
      <br/>
      <!--Body events-->
      <script type="text/javascript">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken="null";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>
   </body>
</html>
<!--...................................................................................................
...................................................................................................
...................................................................................................
...................................................................................................-->
Experts,

I am trying to follow the Trail: Use SOAP API (API Basics). I have been able to obtain a SessionID indicating that I don't have the TLS Issue. However, while creating an Account I am getting the below Response Error. Also, Please view my Request as well. I have gone throough various posts before reaching out to the community. Appreciate if someone can guide me to proceed on this:

Request URL: https://varun1-dev-ed.lightning.force.com/services/Soap/c/43.0

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:sessionId>00D7F000005lNL9!AQ8AQICf9bgDNa3sECRIMMILN4_3Sjl6UAcl1XoWI1EAgrZKkHXh63lyreVSrxWcTPuSK8NsPGUCrEvlm_ZciJFXXXXXXXXj</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--Zero or more repetitions:-->
            <Name>Bluebeards Grog House</Name>
            <Description>It is better than Blackbeards.</Description>
            </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
      <title>Error 405 Only POST allowed</title>
   </head>
   <body>
      <h2>HTTP ERROR 405</h2>
      <p>
         Problem accessing /services/Soap/c/43.0. Reason:
         <pre>Only POST allowed</pre>
      </p>
      <hr/>
      <i>
         <small>Powered by Jetty://</small>
      </i>
      <br/>
      <!--Body events-->
      <script type="text/javascript">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken="null";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>
   </body>
</html>
<!--...................................................................................................
...................................................................................................
...................................................................................................
...................................................................................................-->
Hi I am doing the Assign Top Leads to Your Sales Rep Trailhead module >> https://trailhead.salesforce.com/trails/learn-admin-essentials/projects/prioritize-leads-with-einstein-lead-scoring/steps/assign-top-leads-to-your-sales-rep and when clicking on the Verify Step button at the bottom of the page I get an error
Step not yet complete... here's what's wrong:
We can't find criteria and immediate actions for Einstein Scores greater than or equal to 80.


This error message is not accurate as the steps in the process builder are there, however, I suspect the error is actually due to an email that I receive immediately after pressing the Verify Step button, I have copied and pasted the contents of the email below, any advice/help would be appreciated.

Subject: Developer script exception from Honeydew : 'LeadScoreGenerator' for job id '7071t000000V3oh' : Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

ApexApplication <info@jp.salesforce.com>12:03 (9 minutes ago)
to me
Apex script unhandled exception by user/organization: 0051t000000MOhX/00D1t000000DWM6

Failed to invoke future method 'public static void createScoreAndFactors(List<Id>)' on class 'LeadScoreGenerator' for job id '7071t000000V3oh'

caused by: System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

Class.LeadScoreGenerator.sendRequest: line 130, column 1
Class.LeadScoreGenerator.createScoreAndFactors: line 108, column 1
Hi,

As I am new to Lightning logic, please help me out for my requirement,

I need to create a lightning button, The button wants to Show / hide depends on my checkbox(legal__c) on my case object.

How can we do this ? 
This URL----->>
In your Trailhead Playground, install the Salesforce Adoption Dashboards package
Clone the 2 - Key Feature Adoption dashboard with the name Adoption Features
Save the dashboard in any folder
Edit the dashboard and remove the Neglected Customer Accounts, Neglected Prospect Accounts, and Activity Wall of Shame components
Save and refresh the dashboard

It keeps saying URL expired. How can I fix this issue?? I'm trying to complete the challenge. 
 User-added image
Admin Beginner  Lightning Experience Reports & Dashboards
Extend Your Reporting Strategy with AppExchange

Issue: Unable to install Salesforce Adoption Dashboards:

Unable to complete the Challenge. Here's what's wrong:  I guess there is broken link to install Salesforce Adoption Dashboards package. Was able to complete task in developer acc however Trialhead cant check developer accout. Is there any work around for this?

Could anybody please assist here?
Hi 
I am working on Trailhead module: Test your Process. I followed all the steps in creating Process Builder through Trailhead and I am getting below error:
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, Account number must be 8 characters long: []
Can one of you help or let me know, what I am doing wrong.
Thanks
Hi, 
I am unable to install the Salesforce Adoption Dashboards from the appexchange into my dev org.  I get the following error:

User-added image
Attempting to complete the module by installing the Salesforce Adoption Dashboards package -- receiving an error:

Package Not Found
The requested package does not exist or has been deleted. Please contact the package publisher for assistance. If this is a recently uploaded package, please try again soon.