• KdKomal
  • NEWBIE
  • 290 Points
  • Member since 2018

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 62
    Replies
I want to have a field on the account object called “most recent note”. Basically, when a new note is created, the “note” create date populates here.
 
BONUS: If this is possible— I want to have a field on the account object called “Recent Note Content”. Basically, the most recent note’s content goes here.
 
How would I accomplish this? I sincerely appreciate your help!
Hello,
I'm currently implementing a box.com (similar to dropbox or google drive) file upload setup with Salesforce. Fortunately, there's an app on AppExchange and some instructions on how to implement it in Salesforce.

The client says they want it on each object and custom object page layout. 

The box.com instructions have the following code (I replaced the generic object name with "Task" for this case):

The visualforce page name is: Task_Box_Section.vfp
<apex:page standardController="Task"
           extensions="box.DisplayWidget"
           showheader="false"
           sidebar="false"
           action="{!GetLoginToken}">
    
<apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>
<apex:iframe src="/apex/box__BOXSection?id={!Task.Id}&param=Task_Box_Section"
             rendered="{!DisplayBoxSection}"/>
<apex:iframe src="{!folderShareLink}"
             rendered="{!DisplayBoxWidget}"
             width="100%"
             height="100%"
             frameborder="0"
             scrolling="NO"/>

</apex:page>
Do you see anything that I'm doing wrong ? It's supposed to show up a file upload section, but nothing shows up and there's an error instead.

"Argument cannot be null. An unexpected error has occurred. Your solution provider has been notified. (box)"

May you please assist?

Sincerely,
Jackie
Hi,  I am using Output link as below:
<apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1">
 </apex:outputLink>
When I click on the link, It should redirect as it is. But, '%20' is changing to '+' as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1

How to prevent changing '%20' to '+' ?

 
Hello, I am fairly new and am experimenting with Apex & Visualforce.

I managed to figure out how to display a list of all the users in my org, but I can't figure out how to display a specific user.

Apex Class:
public class UserResultsController {
    
    public List<String>getListOfUsers(){
		List<string> ourUsers = new list<string>();
			
        	for(User a:[SELECT Name FROM User]){
				ourUsers.add(a.Name);
			}
        
		return ourUsers;
	}
 
}
Apex Page:
<apex:page controller="UserResultsController" >
    
   <apex:repeat value="{!ListOfUsers}" var="usl"> 
       <apex:outputText value="{!usl}"/> <br/> 
   </apex:repeat>
        
</apex:page>

Is there a way to either populate the data about a specific user using their User Id or doing a query for a specific user?

I know I can display the current logged in user data by using: {!$User.FirstName} for instance, but I want to display a specific user, not the current logged in user.

Help is greatly appreciated. 
Hi. 

We create "tasks" as reminders and also run reports on tasks. Sometimes those reminders are added in as notes for future reference (but we can't run reports on notes). So, sometimes things are entered in as tasks for reporting reasons.

What we want to do:
Create a checkbox on the task record that says "Create Note"
Once the task is complete, a note will be created on the record. Is there a way to do this? 
On the task itself, there's a "related to [record type] [lookup field]
Name [Contact/Lead] [Lookup Field]
We would want to create the note based on the record indicated on the task.

I created the custom field on the task already. I'm in the process builder, but can't seem to figure it out.

Thank you.
Want to create a batch class on contact object having lookup with account. When contact mobile number get updated then latest mobile umber will get reflected in account object. Please help to code this.
When I click the edit button, the popup displays but does not display any data. Please help!
What is the mistake I'm doing it here.
what I have tried so far:

Visual Force:

<apex:page standardcontroller="UCF_REL__c" extensions="UCFController" sidebar="false" > 
<apex:sectionheader title="UCF Review" /> 
<apex:messages />
 <apex:form rendered="{!displaySection}"> 
<script type="text/javascript"> function LegalNameChangePopup(){ var newwindow = window.open('RELLegalNameChangePopup', 'name=_blank','height=500,width=500,left=250,top=100'); newwindow.focus(); } 
</script>
 <apex:pageblock title="General Information" > 
<apex:pageblocksection title="Legal Name"> 
<apex:panelgrid columns="2"> 
<!-- <apex:outputlabel value="Account Name: " for="accountName" />-->
 <apex:outputfield id="accountName" value="{!aaccount.name}"/>
 <apex:commandbutton value="Edit" id="accpopup" onclick="LegalNameChangePopup();" styleclass="btn"/>
 </apex:panelgrid>
 </apex:pageblocksection> 
</apex:pageblock> 
<apex:pageblock > 
<apex:pageblocksection columns="4"> 
<apex:commandbutton action="{!step2}" value="Save and Continue" styleclass="btn" />
 <apex:commandbutton action="{!reset}" value="Reset Page" styleclass="btn" immediate="true"/>
 </apex:pageblocksection>
 </apex:pageblock> 
</apex:form>
 </apex:page>

VF for popup: RELLegalNameChangePopup

<apex:page standardcontroller="UCF_REL__c" extensions="UCFController" showheader="false" sidebar="false" id="the">
  <apex:form id="page"> 
<apex:pageBlock >
 <apex:pageBlockSection columns="1" title="Legal Name change"> 
<apex:pageblocktable value="{!aAccount}" var="item" id="editAccountName">
 <apex:column headervalue="Proposed Legal Name">
 <apex:inputtext value="{!item.Name}" />
 </apex:column> </apex:pageblocktable>
 </apex:pageBlockSection> 
</apex:pageBlock>
 </apex:form>
  • June 05, 2018
  • Like
  • 0
I had a requirement to run batch job on records created current fiscal year/current year and the job is executed twice in a year. How to pass curent fiscal year/current year dynamically in soql to fetch records created in current fiscal year.
Hi All, I am getting the above error when i included lightning component and saved in my developer console.
Hi,

As logged in user to LWC, I need to display user's related Account details on LWC page.
User object has standard field AccountId. 
Using that AccountId, I need to retrieve the Account details.
But, I am unable to retrieve it.

Here's my code.
 
import getAccountDetails from "@salesforce/apex/AccountSearch.getAccountDetails";

userId = USER_ID
@track accID

@track accounts;
@track error;
@track errors;
  
@wire(getRecord, {
    recordId: "$userId",
    fields: [ACCOUNT_ID,
            ACCOUNT_NAME]
}) wireuser({error, data}) {
    if (error) {
       this.error = error ; 
    } else if (data) {
        this.accID = data.fields.AccountId.value;
    }
}

//this is not working
@wire (getAccountDetails, {accountId: "$accId"}) wiredAccounts({data, error}){
  if(data) {
    this.accounts =data;
    this.errors = undefined;
  }else {
    this.accounts =undefined;
    this.errors = error;
    console.log("error - "+error);
  }
}
 
public without sharing class AccountSearch {
    @AuraEnabled(cacheable=true)
    public static Account getAccountDetails(String accountId){
        Account accountDetails = [Select id, name, recordtypeid, type FROM Account WHERE id=:accountId];
        return accountDetails;
    }
}

 
I am trying to load a csv file (encoded as UTF-8) into the salesforce Data Loader. One of the values in the csv file is a string reading "Biotechnology & Science". When I try loading the csv file, I receive the following error.
bad value for restricted picklist field: Biotechnology &amp; Science
I have referenced Salesforce knowledge articles such as this, but none have helped. I have tried checking off the Data Loader's "Read all CSVs with UTF-8 encoding" checkbox but it does not resolve the issue. Manually enclosing the value in double quotes (") does not help either.
The csv file when opened with Notepad shows the following:
False,3,Biotechnology & Science,Jacksonville University,
(This is only a snippit of the data but coveres the value discussed)

I am creating the csv file via a Python 3 script using the Pandas .to_csv() method, which defaults encoding to UTF-8. I am operating on a Windows 10 computer.

Any help would be greatly appreciated!
I want to have a field on the account object called “most recent note”. Basically, when a new note is created, the “note” create date populates here.
 
BONUS: If this is possible— I want to have a field on the account object called “Recent Note Content”. Basically, the most recent note’s content goes here.
 
How would I accomplish this? I sincerely appreciate your help!
How can I set off a field update when a date's month changes to the previous month?

Ex. if the date is 5/1/2018, and it changes to 4/2018, i need a field to update. I currently have this:

AND(
ISCHANGED(Date__c),
date__c < (PRIORVALUE(date__c) - 30)
)
Hello,
I'm currently implementing a box.com (similar to dropbox or google drive) file upload setup with Salesforce. Fortunately, there's an app on AppExchange and some instructions on how to implement it in Salesforce.

The client says they want it on each object and custom object page layout. 

The box.com instructions have the following code (I replaced the generic object name with "Task" for this case):

The visualforce page name is: Task_Box_Section.vfp
<apex:page standardController="Task"
           extensions="box.DisplayWidget"
           showheader="false"
           sidebar="false"
           action="{!GetLoginToken}">
    
<apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>
<apex:iframe src="/apex/box__BOXSection?id={!Task.Id}&param=Task_Box_Section"
             rendered="{!DisplayBoxSection}"/>
<apex:iframe src="{!folderShareLink}"
             rendered="{!DisplayBoxWidget}"
             width="100%"
             height="100%"
             frameborder="0"
             scrolling="NO"/>

</apex:page>
Do you see anything that I'm doing wrong ? It's supposed to show up a file upload section, but nothing shows up and there's an error instead.

"Argument cannot be null. An unexpected error has occurred. Your solution provider has been notified. (box)"

May you please assist?

Sincerely,
Jackie
Hi. 

We create "tasks" as reminders and also run reports on tasks. Sometimes those reminders are added in as notes for future reference (but we can't run reports on notes). So, sometimes things are entered in as tasks for reporting reasons.

What we want to do:
Create a checkbox on the task record that says "Create Note"
Once the task is complete, a note will be created on the record. Is there a way to do this? 
On the task itself, there's a "related to [record type] [lookup field]
Name [Contact/Lead] [Lookup Field]
We would want to create the note based on the record indicated on the task.

I created the custom field on the task already. I'm in the process builder, but can't seem to figure it out.

Thank you.