• jkc
  • NEWBIE
  • 155 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 20
    Replies
Hi,
I have question on HTTP response from debug log (Dev console) , I can see the response but to view the response in text pad or word pad I would like to copy it from the Log, how can I do it, can you please advise?

 
Hi,

I'm trying to create a sample report to use in the test class. I cannot use the SeeAllData=true because the test class is for a managed package and cannot assume that there is a sample report record available in the user's instance to use when they install it, so I really need to create a new report in the test class.

Is this even possible or a work around for this?
  • October 10, 2016
  • Like
  • 0
Hi

Is it possible to create a trigger that will activate once a report has been created?
  • September 30, 2016
  • Like
  • 0
Hi,

I created a package and it has been installed in a sandbox.

everything is working fine when installed in production but when installed in sandbox a "Session Expired or Invalid" is returned when trying to make a post request on the created custom rest api.

 
  • September 29, 2016
  • Like
  • 0
Hi,

I have a visualforce page and I have a url that redirects to email author(/_ui/core/email/author/EmailAuthor) and it says 'This page isn't available in Salesforce Lightning Experience or Salesforce1.'

here is the javascript:
function emailDoc(strEmailDocId, strRecordID){     
        // set the url to redirect to
        var strURL = '/_ui/core/email/author/EmailAuthor?doc_id=' + strEmailDocId + '&p3_lkid=' + strRecordID + '&retURL=' + strRecordID;
            // Salesforce1 navigation
            sforce.one.navigateToURL(strURL, true);
}

Is there a way for me to call the email author through Lightning experience? It's ok even if takes the page back to a classic theme.
  • July 26, 2016
  • Like
  • 0
Hi,

I created a custom object and set the record name to text and now I realize that I need to set it to Auto-number. The problem is I cannot change it.
this object is included in my managed package so I cannot delete and recreate.

Is there a way around this?
I'll appreciate any help. Thanks
  • June 24, 2016
  • Like
  • 0
Hi,
I'm trying to add JSENCODE into the the <div> onclick function but I am getting an error: Incorrect argument type for function 'JSENCODE()'. : Markup

Here is the code on my Visualforce component  - strKeySet is just a string/text
<apex:repeat value="{!arKeySet}" var="strKeySet">
    <div class="section">
        <div class="header">
            <div id="Plus_{!strKeySet}" class="IconPlus slds-float--left Plus{!strKeySet}" onclick="console.log('{!JSENCODE(strKeySet)}'); return false;">
            </div>
            <div id="Minus_{!strKeySet}" class="IconMinus slds-float--left Minus{!strKeySet}" style="display: none;" onclick="console.log('{!JSENCODE(strKeySet)}'); return false;">
            </div>
            <apex:repeat value="{!objLastestEventsForVF[strKeySet]}" var="objLatestEvent">
                <div class="column1 slds-float--left">
                    <b>
                        <apex:outputText value="{!objLatestEvent.strTempName}" title="{!objLatestEvent.strTempName}"/>
                    </b>
                </div>
            </apex:repeat>
        </div>
    </div>
</apex:repeat>


Please help. Thanks
 
  • June 16, 2016
  • Like
  • 0
Hi,

I would just like to know if there is a limit on the number of times I could scan the managed package I created. It is to be upload to AppExchange.
  • June 14, 2016
  • Like
  • 0
Hi,
I'm in a terrible dilemma with the trigger. I was wondering why there is no id assigned on the record anymore
trigger trigger_Account on Account(before insert, before update){
  for( Account acc : Trigger.new){
    system.debug('Account id: ' + acc.id);
  }
}
this change affected some of my previous triggers
  • June 10, 2016
  • Like
  • 0
Hi,

I created two pageBlockSection with four cloumns and I want their columns to be aligned. I tried editing the css but it's not working.
  • May 18, 2016
  • Like
  • 0

Hi,
I created a lightning component that I embed in Community Builder custom page.
I called a apex controller function that will redirect to the Community Builder Home Page

This is my apex method
@AuraEnabled
    public static pageReference redirectToHomePage() {
        pageReference objHomePage = new PageReference('/');        
        return objHomePage;
    }

I'm not sure exactly how to call the Community Builder Home Page
I also get an error 'Return type does not support AuraEnabled'

I just want to redirect to Community Builder Home Page

  • April 29, 2016
  • Like
  • 0

Hi,

I created a managed package and included the Account's page layout but when I install the package to another developer org the Account's page layout is not updated.

Is there a way to automatically add custom components in the page layout or is it really not allowed?

  • April 19, 2016
  • Like
  • 0

Hi,

I need to create a button that will open an email composer. I was thinking of creating it from scratch but is there an available Salesforce email composer that I could just redirct to so I won't need to create everything from scratch?

  • February 12, 2016
  • Like
  • 0
I'm trying to change the timeout value from apex using a button in <apex:actionStatus>
apex class:
global class ApexController {
public Integer intMergeTimeout {get; set;}
public void timeoutMerge(){
        //set timeout to 1second
        intMergeTimeout = 500;
    }
}

javascript:
 
<apex:includeScript value="/soap/ajax/21.0/connection.js"/>
        <apex:includeScript value="/soap/ajax/21.0/apex.js"/>
        <script>
        function timeout(){
            sforce.connection.sessionId = "{!$Api.Session_ID}";
            try{
                var result = sforce.apex.executeAnonymous("ApexController","timeoutMerge",{});
                console.log('Timeout!!');
            }catch(e) {
                alert(e);
            }
        }
        </script>

VF(because apex:commandButton doesn't work in the facet I used <input type:"button">):
 
<apex:commandButton value="Action" action="{!action}" status="Loading" reRender="pageSecId" timeout="{!intMergeTimeout}"/>                            
                            <apex:actionStatus id="Loading" >
                                <apex:facet name="start">                                    
                                    <div>
                                        <div class="popupBackground" />
                                        <div class="PopupPanel">
                                            <div align="center">
                                                <div class="slds-text-heading--label">
                                                    <b>Merging...</b>                                                    
                                                </div>
                                                <div class="slds-button slds-button--brand">
                                                    <input type="button" onclick="timeout()" value="Cancel"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </apex:facet>                                
                                <apex:facet name="stop"></apex:facet>
                            </apex:actionStatus>





 
  • January 14, 2016
  • Like
  • 0

Hi,

Is it possible to make aura:id dynamic? because when I try to get the aura:id in the controller using getLocalID I'm getting 
{!'index' + index}.

<aura:iteration indexVar="index" items="{!v.actions}" var="obj">
     <tr aura:id="{!'index' + index}">                                    
          <td>
              <ui:inputCheckbox aura:id="{!'index' + index}" change="{!c.changeCheckbox}" >
                   {!'index' + index}
               </ui:inputCheckbox>
         </td>
         <td>
              {!obj.Summary__c}
         </td>
         <td>
              {!obj.Due_Date__c}
         </td>
         <td>
              {!obj.User__c}
          </td>
     </tr>                                    
</aura:iteration>
  • October 13, 2015
  • Like
  • 0
I am trying to figure out how Queue works, so I created a new queue in Leads but now I can't figure out how exact can a record be manually added to the queue list. Any help is appreciated thank you! :)
  • September 20, 2015
  • Like
  • 1

What is the answer for this?

Custom Tabs have properties such as: Select all that apply
A. Custom Fields
B. Relation to other objects
C. Page Layout
D. User Tabs
E. Audio Visual capabilities
F. They do not have properties

my answer if F. I'm confuse because some says the answer is ABCD.
Could anyone please explain this to me?

  • September 18, 2015
  • Like
  • 0

I'm trying to create a test class but it always shows an error when inserting the sample data

@isTest
private class Test_UpdateJobTechnicalResource
{    
    static TestMethod void validate_TechResource() {   
        sked__Job_Allocation__c job = new sked__Job_Allocation__c();
        
        //sked__Job__c Object has a master-detail relationship with Job Allocation
        job.sked__Job__c = 'a0EN0000007ZpD8';
        //this one has a lookup relationship on Job Application
        job.sked__Resource__c='a0LN00000036fnH';

        insert job;
        
        //After Job Insert
        sked__Job__c afterTestJob = [SELECT Id, Technical_Resource_Assigned__c from sked__Job__c where Id = :'a0EN0000007ZpD8'];
        System.assertEquals('Test', afterTestJob.Technical_Resource_Assigned__c);  
    }
}

When I run this it returns an error

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, UpdateJobTechnicalResource: execution of AfterInsert
caused by: System.QueryException: List has no rows for assignment to SObject
Trigger.UpdateJobTechnicalResource: line 7, column 1: []
Class.Test_UpdateJobTechnicalResource.validate_TechResource: line 13, column 1

  • September 09, 2015
  • Like
  • 0
Hi,

I want to change the default design of the created quote pdf, like the font style and size. I've read that some suggested to use HTML Editor by creating a Rich Text Area custom field but I don't know how this will work in the template.
  • August 24, 2015
  • Like
  • 0
Hi,

I tried adding new values under Stage field but when I try to create a new Opportunity none of the added values appear under Stage.
Thank you in advance
  • August 20, 2015
  • Like
  • 0

Hi,
I'm trying to create a formula that gets all values from a multiple picklist but it exceeds the characters limit of 3900 - the formula I created has 4993 characters

Here is how I get the values:

IF(INCLUDES( multiple_picklist__c , "A"), "A", NULL) + ", " +
IF(INCLUDES( multiple_picklist__c , "B"), "B", NULL) + ", " +
IF(INCLUDES( multiple_picklist__c , "C"), "C", NULL) + ", " +
IF(INCLUDES( multiple_picklist__c , "D"), "D", NULL)

Is there a shorter way to do this?

  • August 10, 2015
  • Like
  • 0
I am trying to figure out how Queue works, so I created a new queue in Leads but now I can't figure out how exact can a record be manually added to the queue list. Any help is appreciated thank you! :)
  • September 20, 2015
  • Like
  • 1
Hi there, I am new to Salesforce and trying to get started with REST Api's for things like
- getting Auth'd
- creating Leads
- converting Leads to Opportunities
- updating dollar amounts, etc

Been jumping through screens and docs and have a few questions.

I read somewhere it must be a Developer Edition account to use Api's. How do we determine what type of Organization the account is in? 

Somewhere mentioned Api Enabled must be turned on. Where do I go to enable/disable Api services needed?

Is there a list of Api services with documentation? Trying to find out how to navigate to Api's and their docs. Is Data.com part of Force.com.

There are 4 types of Sandboxes but not sure which to try Api's with. Can the Developer Sandbox be used with Apis for Auth, Lead gen, Lead to Opportunity conversion, etc, or is it limited to only certain Sandbox types?

All help is appreciated, thanks!
 
Hi,
I have question on HTTP response from debug log (Dev console) , I can see the response but to view the response in text pad or word pad I would like to copy it from the Log, how can I do it, can you please advise?

 
Hi,

I'm trying to create a sample report to use in the test class. I cannot use the SeeAllData=true because the test class is for a managed package and cannot assume that there is a sample report record available in the user's instance to use when they install it, so I really need to create a new report in the test class.

Is this even possible or a work around for this?
  • October 10, 2016
  • Like
  • 0
Hi,

I created a custom object and set the record name to text and now I realize that I need to set it to Auto-number. The problem is I cannot change it.
this object is included in my managed package so I cannot delete and recreate.

Is there a way around this?
I'll appreciate any help. Thanks
  • June 24, 2016
  • Like
  • 0
Hi,

I created two pageBlockSection with four cloumns and I want their columns to be aligned. I tried editing the css but it's not working.
  • May 18, 2016
  • Like
  • 0

Hi,

I created a managed package and included the Account's page layout but when I install the package to another developer org the Account's page layout is not updated.

Is there a way to automatically add custom components in the page layout or is it really not allowed?

  • April 19, 2016
  • Like
  • 0

Hi,

I need to create a button that will open an email composer. I was thinking of creating it from scratch but is there an available Salesforce email composer that I could just redirct to so I won't need to create everything from scratch?

  • February 12, 2016
  • Like
  • 0
I'm trying to change the timeout value from apex using a button in <apex:actionStatus>
apex class:
global class ApexController {
public Integer intMergeTimeout {get; set;}
public void timeoutMerge(){
        //set timeout to 1second
        intMergeTimeout = 500;
    }
}

javascript:
 
<apex:includeScript value="/soap/ajax/21.0/connection.js"/>
        <apex:includeScript value="/soap/ajax/21.0/apex.js"/>
        <script>
        function timeout(){
            sforce.connection.sessionId = "{!$Api.Session_ID}";
            try{
                var result = sforce.apex.executeAnonymous("ApexController","timeoutMerge",{});
                console.log('Timeout!!');
            }catch(e) {
                alert(e);
            }
        }
        </script>

VF(because apex:commandButton doesn't work in the facet I used <input type:"button">):
 
<apex:commandButton value="Action" action="{!action}" status="Loading" reRender="pageSecId" timeout="{!intMergeTimeout}"/>                            
                            <apex:actionStatus id="Loading" >
                                <apex:facet name="start">                                    
                                    <div>
                                        <div class="popupBackground" />
                                        <div class="PopupPanel">
                                            <div align="center">
                                                <div class="slds-text-heading--label">
                                                    <b>Merging...</b>                                                    
                                                </div>
                                                <div class="slds-button slds-button--brand">
                                                    <input type="button" onclick="timeout()" value="Cancel"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </apex:facet>                                
                                <apex:facet name="stop"></apex:facet>
                            </apex:actionStatus>





 
  • January 14, 2016
  • Like
  • 0
I am trying to figure out how Queue works, so I created a new queue in Leads but now I can't figure out how exact can a record be manually added to the queue list. Any help is appreciated thank you! :)
  • September 20, 2015
  • Like
  • 1

I'm trying to create a test class but it always shows an error when inserting the sample data

@isTest
private class Test_UpdateJobTechnicalResource
{    
    static TestMethod void validate_TechResource() {   
        sked__Job_Allocation__c job = new sked__Job_Allocation__c();
        
        //sked__Job__c Object has a master-detail relationship with Job Allocation
        job.sked__Job__c = 'a0EN0000007ZpD8';
        //this one has a lookup relationship on Job Application
        job.sked__Resource__c='a0LN00000036fnH';

        insert job;
        
        //After Job Insert
        sked__Job__c afterTestJob = [SELECT Id, Technical_Resource_Assigned__c from sked__Job__c where Id = :'a0EN0000007ZpD8'];
        System.assertEquals('Test', afterTestJob.Technical_Resource_Assigned__c);  
    }
}

When I run this it returns an error

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, UpdateJobTechnicalResource: execution of AfterInsert
caused by: System.QueryException: List has no rows for assignment to SObject
Trigger.UpdateJobTechnicalResource: line 7, column 1: []
Class.Test_UpdateJobTechnicalResource.validate_TechResource: line 13, column 1

  • September 09, 2015
  • Like
  • 0

Hi,
I'm trying to create a formula that gets all values from a multiple picklist but it exceeds the characters limit of 3900 - the formula I created has 4993 characters

Here is how I get the values:

IF(INCLUDES( multiple_picklist__c , "A"), "A", NULL) + ", " +
IF(INCLUDES( multiple_picklist__c , "B"), "B", NULL) + ", " +
IF(INCLUDES( multiple_picklist__c , "C"), "C", NULL) + ", " +
IF(INCLUDES( multiple_picklist__c , "D"), "D", NULL)

Is there a shorter way to do this?

  • August 10, 2015
  • Like
  • 0
I have an input field and I want to change its value when the radiobutton value changes.

Here's the code:

<script type="text/javascript">
    var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
<script src="/soap/ajax/33.0/connection.js" type="text/javascript"></script>
<script> 
function Change(){
        for (i = 0; i<6; i++)
        {
            var check = document.getElementById("thePage:theForm:theBlock:theSection:rev:" + i).checked;
            if( check == true)
            {
                totalcv += document.getElementById("thePage:theForm:theBlock:theSection:rev:" + i).value;
            }
            
            check = document.getElementById("thePage:theForm:theBlock:theSection:rec:" + i).checked;
            if(check == true)
            {
                totalcv += document.getElementById("thePage:theForm:theBlock:theSection:rec:" + i).value;
            }
       }    
       var avg = totalcv/count;
        document.getElementById("thePage:theForm:theBlock:theSection:avg").value = avg;
    }
</script>  

<apex:selectRadio id="rev" label="Review" value="{!Account.Review__c}" border="1" disabled="true" styleClass="button1" onchange="Change();">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>

<apex:selectRadio id="rec" label="Recommended" value="{!Account.Recommended__c}" border="1" disabled="true" styleClass="button1" onchange="Change();">
<apex:selectOption itemLabel="Very Satisfactory" itemValue="6"/>
<apex:selectOption itemLabel="Satisfactory" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>

<apex:inputField value="{!Account.Average__c}" id="avg" label="Average" />

Thanks in advance :)
  • April 01, 2015
  • Like
  • 0

I want to make the radio button into a checkbox image when selected. I applied a css style but it doesn't work. Here's my css code:

input[type="radio"]:checked
    {
        background: url({!URLFOR($Resource.checkbox, 'checkbox.jpg')});
    }
    
    input[type="radio"]:checked+label
    { 
        font-weight: bold; 
        background-color: rgb(153,204,102); 
        
    }

  • March 25, 2015
  • Like
  • 0
Is it possible to create a master-detail relationship between two standard objects? If yes, how?
  • March 12, 2015
  • Like
  • 0