• Steve_Finlay
  • NEWBIE
  • 60 Points
  • Member since 2010
  • Developer
  • Medibank


  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 16
    Replies
I have installed the Salesforce CLI package and it is working fine from the terminal window.
I have installed the Salesforce Extensions package into Visual Studio Code and all looks fine.
However when I enter Command-Shift-P and type something like SFDX: Create Package I get a notification to install the Salesforce CLI package.
All the sfdx commands work fine from with VS Code’s terminal window.

I am at a loss as to what is wrong. 
I am running on a Mac and all the help articles are for Windows are direct you towards missing or incorrect Path statements. Not much help for a Mac user.

I have tried completely removing the SFDX package (via rm statements from terminal) along with removing the Salesforce extensions from VSCode. After reinstalling all this - same problem.

Any ideas or help would be appreciated.
 
I have made some additions and changes to a custom picklist field and then added this field to a change set. When I then deploy that change set to another sandbox none of the picklist value changes are being deployed.
Note:
  • I can see the new picklist values in the change set XML
  • I am not using any Record Types with the custom object - so its not that the values are yet to be made available
I'm sure this has always worked properly in the past but not now under Winter'17.
Having to document and make the changes to the destination orgs manually - very annoying.

I have set up an approval process for a custom object and the final action is to lock the record once it has been approved.

 

However, at some time after the record has been approved, the approver wants to be able to edit the record to mark it as 'closed'. Seems that only an admin can edit the record at this stage?

 

Is there some way for the approver to be able to edit the record after it has been approved, or to be at least able to set a checkbox to be able to flag the record has 'closed'?

 

Steve

 

 

I have a custom object with a master-detail relationship with the contact object. The custom object has a date field.

 

I'm wanting to generate a report of contacts that don't have a custom object record with a date within the last 7 days.

When logged in as an user other than the system admin account and click upon the magnifying glass of a master-detail lookup in a new form I get the standard lookup window.

However if I specify the '*' wildcard as a search parameter then nothing is returned.

If the first couple of characters of known 'master' record is entered, then the matching records are returned in the search results.

Logged on as the system admin, then the '*' wildcard works as expected.

 

Any ideas?

 

Steve

I have migrated a custom object from my development org across to the production org via the Force.com IDE and have then manually added the Approval Process.

 

However, now when I try to approve a test record I get the following error...

 

"There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Related To: id value of incorrect type: a082000000PGudk". 

 

There is not much of a hint as to what 'field' has the incorrect type.

 

As a said the record has been entered and the approver has select 'Approve' to the submitted record.

 

What has gone wrong?  The approval process was working fine in my development org.

 

Any help would be appreciated.

 

Steve

I've been looking at the Force.com IDE add-on for Eclipse...

If I make a change to a pick list value within the IDE and then do Force.com -> Save to Server, the modified pick list value is then ADDED as an additional pick list item.

This is not what I'm wanting to do, I want the Save to Server to replace what's on the server.

 

Am I doing something wrong?

 

Steve

I've been looking at the Force.com IDE add-on for Eclipse...

 

If I make a change to a pick list value within the IDE and then do Force.com -> Save to Server, the modified pick list value is then ADDED as an additional pick list item. 

 

This is not what I'm wanting to do, I want the Save to Server to replace what's on the server.

 

Am I doing something wrong?


Steve

I have been trying to add another new user to my developer org and I get the error message that the username already exists. However, when I list all the users there is no user listed with this username.

 

What is happening here? I'm confused!

 

Steve

I have been trying to have the rule criteria for a workflow to evaluate to TRUE if a date field in the custom object has been changed.

 

I've been attempting this via the ISCHANGED(Date_field__c) function. However this fails with a message that this function  is invalid for this type of formula.

 

I then want a time dependent workflow action to be set...

 

Any ideas on how I can do this?

 

Now that I've created a couple of record types for a custom object, how do change which record type is the default now that they are created?

I want to add two record types to an existing custom object ( that currently has no record types )...

 

What happens to all the existing data in the custom object once the record type field is added? Are they assigned to the default record type or is the record type for the existing records set to 'None'?

 

If it is set to None, then what page layout is used for the existing records?

I have a VF page working that hides certain sections of the page depending upon the users selection via radio buttons.

 

 

<apex:selectRadio value="{!Custom_object__c.Custom_field__c}" onclick="display(this);" >

...

<span id="Details" style="display: block">
...
</span>
function display(x) {
var display = x;
		
if (display == 'true') {
	document.getElementById('Details').style.display = 'none';
} else {
	document.getElementById('Details').style.display = 'block';
}
}

 

The display(this) function sets the style of the span section to be either none or block depending upon the radio button selection.

 

This all works fine except that when the user would push the Submit button on the form, if there is a field validation error, then the page is re-loaded and any of the changes made to the span section's visibility are reset to their default values.

 

I've tried trapping this with the window.onload handler, but of course any global variables I might set have been reset along with the page load. Also if I try to query the value of the radio button component, it's value is not available via the onload handler.

 

I am trying to use the result of the user selecting a radio button to rerender a pageblocksection ( before they would press the save button )

 

I've attempted this by using Javascript and the 'onclick' parameter to the apex:selectOption

 

 

<script>
var displayDetails = true;
	
function setDisplayDetails(toDisplay) {
	displayDetails = toDisplay;
}
	
function getDisplayDetails() {
        return displayDetails;
}
</script>
	
<apex:form >
	<apex:pageBlock mode="edit">

		<apex:pageBlockSection title="Section 1" columns="1">
			<apex:pageBlockSectionItem >
				<apex:outputText value="Select yes or no?" />
				<apex:selectRadio value="{!Custom_Object__c.Custom_object_field__c}">
					<apex:selectOption itemValue="true" itemLabel="Yes" onclick="setDisplayDetails(false);" />
					<apex:selectOption itemValue="false" itemLabel="No" onclick="setDisplayDetails(true);" />
					<apex:actionSupport event="onchange" rerender="Details" />
				</apex:selectRadio>
			</apex:pageBlockSectionItem>
		</apex:pageBlockSection>

		<apex:pageBlockSection title="Details" columns="1" id="Details"
			rendered="getDisplayDetails();">

 I've discovered that the rendered="getDisplaydetails();" section isn't working as it is expecting a value that equates to a boolean and doesn't appear the call a Javascript function.

 

I'm beginning to think that I will need a custom controller to return a value to the pageBlockSection.

Then the question becomes, how do I set the value of the selected radio button into the custom controller?

Can I do this from the Javascript function setDisplayDetails?

 

Can I write a controller for a Visualforce page that 'extends' the functionality of the standardController?

 

I have a custom object, and want to add some function to that supplied by the standard controller for the custom object.

 

At the moment I am using the standard controller to access the custom objects fields and the quick save method.

 

is there something like

 

public class CustomController extends StandardController {

 

 

syntax available?

 

What is best practice for extending the functionality of a standard controller?

I currently have an Email Alert setup as the output from a Workflow when a new record is created. This is all working fine.

 

However, I would like to be able to change the 'from' email address.

 

When I edit the Email Alert, the only option I have is 'Current User's Email Address'

 

This results in the from email being...

no-reply@salesforce.com on behalf of MyName [ my_email_address ]

 

Ideally I would like this to be 'no-reply@my_company_domain'

 

 

In the following code sample...

 

<apex:selectRadio value="{!CustomObject__c.CustomField__c}" >

  <apex:selectOption itemValue="true" itemLabel="Yes" />

  <apex:selectOption itemValue="false" itemLabel="No" />

</apex:selectRadio>

 

The second item "No" is selected by default. I want the first item "Yes" to be the one that is, by default, the selected item.

 

Steve

I've just started to use the Force.com IDE within Eclipse and I gather that the 'best' way to update the items in the project is to delete the project and then recreate it from the server. This is in the case where, for example, an application has been uninstalled and I no longer want it to appear in Eclipse.

 

A 'Refresh from Server' still leaves the components within Eclipse that have now been removed from the server, and then I get prompted to add them again when I would do a 'Deploy to Server'.

 

Steve

 

 

Just installed Safari 5 and now find that the text in the built in visualpage editor is unreadable :(

 

( This is actually with Safari 5 under Windows XP - will try later on my Mac at home, but assume it will be the same. Safari 4 worked fine )

 

 

 

On the "Go to Admin to Hero" web page http://www.salesforce.com/campaigns/admin2hero/starter_kit.jsp there is a training video entitled "Introduction to Force.com Sites"
Within this video there is mention of being able to download to sample objects and code so you can load them into your own org to try out the examples.
However, when I click on the Attachments tab, there is nothing available to download.
 
Can I download the samples from somewhere?
 
Steve

In the following code sample...

 

<apex:selectRadio value="{!CustomObject__c.CustomField__c}" >

  <apex:selectOption itemValue="true" itemLabel="Yes" />

  <apex:selectOption itemValue="false" itemLabel="No" />

</apex:selectRadio>

 

The second item "No" is selected by default. I want the first item "Yes" to be the one that is, by default, the selected item.

 

Steve

I have installed the Salesforce CLI package and it is working fine from the terminal window.
I have installed the Salesforce Extensions package into Visual Studio Code and all looks fine.
However when I enter Command-Shift-P and type something like SFDX: Create Package I get a notification to install the Salesforce CLI package.
All the sfdx commands work fine from with VS Code’s terminal window.

I am at a loss as to what is wrong. 
I am running on a Mac and all the help articles are for Windows are direct you towards missing or incorrect Path statements. Not much help for a Mac user.

I have tried completely removing the SFDX package (via rm statements from terminal) along with removing the Salesforce extensions from VSCode. After reinstalling all this - same problem.

Any ideas or help would be appreciated.
 

I have set up an approval process for a custom object and the final action is to lock the record once it has been approved.

 

However, at some time after the record has been approved, the approver wants to be able to edit the record to mark it as 'closed'. Seems that only an admin can edit the record at this stage?

 

Is there some way for the approver to be able to edit the record after it has been approved, or to be at least able to set a checkbox to be able to flag the record has 'closed'?

 

Steve

 

 

I have a custom object with a master-detail relationship with the contact object. The custom object has a date field.

 

I'm wanting to generate a report of contacts that don't have a custom object record with a date within the last 7 days.

I have been trying to add another new user to my developer org and I get the error message that the username already exists. However, when I list all the users there is no user listed with this username.

 

What is happening here? I'm confused!

 

Steve

I want to add two record types to an existing custom object ( that currently has no record types )...

 

What happens to all the existing data in the custom object once the record type field is added? Are they assigned to the default record type or is the record type for the existing records set to 'None'?

 

If it is set to None, then what page layout is used for the existing records?

I am trying to use the result of the user selecting a radio button to rerender a pageblocksection ( before they would press the save button )

 

I've attempted this by using Javascript and the 'onclick' parameter to the apex:selectOption

 

 

<script>
var displayDetails = true;
	
function setDisplayDetails(toDisplay) {
	displayDetails = toDisplay;
}
	
function getDisplayDetails() {
        return displayDetails;
}
</script>
	
<apex:form >
	<apex:pageBlock mode="edit">

		<apex:pageBlockSection title="Section 1" columns="1">
			<apex:pageBlockSectionItem >
				<apex:outputText value="Select yes or no?" />
				<apex:selectRadio value="{!Custom_Object__c.Custom_object_field__c}">
					<apex:selectOption itemValue="true" itemLabel="Yes" onclick="setDisplayDetails(false);" />
					<apex:selectOption itemValue="false" itemLabel="No" onclick="setDisplayDetails(true);" />
					<apex:actionSupport event="onchange" rerender="Details" />
				</apex:selectRadio>
			</apex:pageBlockSectionItem>
		</apex:pageBlockSection>

		<apex:pageBlockSection title="Details" columns="1" id="Details"
			rendered="getDisplayDetails();">

 I've discovered that the rendered="getDisplaydetails();" section isn't working as it is expecting a value that equates to a boolean and doesn't appear the call a Javascript function.

 

I'm beginning to think that I will need a custom controller to return a value to the pageBlockSection.

Then the question becomes, how do I set the value of the selected radio button into the custom controller?

Can I do this from the Javascript function setDisplayDetails?

 

I currently have an Email Alert setup as the output from a Workflow when a new record is created. This is all working fine.

 

However, I would like to be able to change the 'from' email address.

 

When I edit the Email Alert, the only option I have is 'Current User's Email Address'

 

This results in the from email being...

no-reply@salesforce.com on behalf of MyName [ my_email_address ]

 

Ideally I would like this to be 'no-reply@my_company_domain'

 

 

In the following code sample...

 

<apex:selectRadio value="{!CustomObject__c.CustomField__c}" >

  <apex:selectOption itemValue="true" itemLabel="Yes" />

  <apex:selectOption itemValue="false" itemLabel="No" />

</apex:selectRadio>

 

The second item "No" is selected by default. I want the first item "Yes" to be the one that is, by default, the selected item.

 

Steve

Just installed Safari 5 and now find that the text in the built in visualpage editor is unreadable :(

 

( This is actually with Safari 5 under Windows XP - will try later on my Mac at home, but assume it will be the same. Safari 4 worked fine )

 

 

 

On the "Go to Admin to Hero" web page http://www.salesforce.com/campaigns/admin2hero/starter_kit.jsp there is a training video entitled "Introduction to Force.com Sites"
Within this video there is mention of being able to download to sample objects and code so you can load them into your own org to try out the examples.
However, when I click on the Attachments tab, there is nothing available to download.
 
Can I download the samples from somewhere?
 
Steve

 

This is my first attempt at creating a sites page.
I'm unable to get any non-required field to display on the public site. The required fields display ok. By 'required', I mean required as set in the custom object.
 
Here is the visualforce page code...
 
<apex:page showHeader="false" sidebar="false" standardController="Complaint__c">
    <h1>Online Complaint Handling</h1>
    <apex:form >
        <apex:outputText value="Are you logging the complaint for yourself?" />
        <apex:inputField value="{!Complaint__c.Logging_this_complaint_for_yourself__c}" />
        <br/>
         
        <apex:outputText value="Complainant First Name" />
        <apex:inputField value="{!Complaint__c.Complaint_First_Name__c}" />
        <br/>
        
        <apex:outputText value="Relationship to Caller" />
        <apex:inputField value="{!Complaint__c.Relationship_to_Caller__c}" />
        <br/>
         
        <apex:outputText value="Caller Name" />
        <apex:inputField value="{!Complaint__c.Caller_Name__c}" />
        <br/>
         
        <apex:outputText value="Caller State" />
        <apex:inputField value="{!Complaint__c.Caller_State__c}" />
        <br/>
        
        <apex:outputText value="Date of Call" />
        <apex:inputField value="{!Complaint__c.Date_of_Call__c}" />
        <br/>
        
    </apex:form>
</apex:page>
 
 
Only the Caller_Name__c and the Date_of_Call__c input fields display on the public site, and they are the only 'required' fields from the Complaint custom object. The other input fields such as Complaint_First_Name__c just don't display on the public site.
 
The page displays correctly if previewed from within Salesforce via https://ap1.salesforce.com/apex/Complaint for example.
 
Can anyone offer some help as to what is wrong?
 

the installation guide for the Force.com IDE recommends NOT to use the cocoa versions of eclipse 3.5. Not that it matters for productivity if you use Carbon or Cocoa or 32 or 64bit, but I was curious and tried the Cocoa 64bit version and haven't had any problems yet.

 

Has anyone else tried and experienced any problems?