• Zhen Yueh Lean
  • NEWBIE
  • 60 Points
  • Member since 2017

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 17
    Replies
I have a Text Area field where in use enters the data, I need to split that in the flow (may be based on space) , can anyone help here , can I use formula fields to accomplish this

​Thanks
I'm struggling to understand this concept.

We have a custom object (Intake__c) that is the master in relationships with other objects (Income__c, Non_Cash_Benefits__c etc.)

I need to be able to create a custom button from an Intake Record that can create a pdf of the Intake Record as well as display fields from records within the related list. Just showing the related list in the pdf does not suffice which is what he currently have.

What is the easiest way to do this? Would I need to create extensions for all the related objects where the id on the Intake Record is the same as the ID on the child records and add them to the standard controller for Intake__c? Then in the VF page layout use an apex:repeat value to displays fields from the multiple records associated to the intake?

If so, could someone help me out with what the basic code for this would look like?

Thanks,

Adam
Hi guys,

We have developed a custom lightning component form by utilising the lightning:recordViewForm and lightning:recordEditForm. The component works fine in our development org and tested in napili community as well. We then packaged the component as managed package and install into our development org.

We encountered a weird behaviour when testing the component in napili community. The fields came up correctly in community builder for both recordViewForm and recordEditForm.

User-added image

However, the fields will not be rendered when we view the page as community user. The community user profile has the permission to edit contact details and has the read/edit permission on Mobile Phone and Birthdate fields. 

User-added image

Any help is much appreciated!
we are using App from app exchange which is managed.
we are trying to edit VF page to display parent fields using field sets.we are not able to get them on to vf page.
What am i missing??

my VF page is as below.
 
<apex:page standardController="Childobject__c" extensions="managedapexclass" recordSetVar="CO">
  <script>
        window.onload = function(e) {
           var recordIds = '{!selected}';
           var Objectname = 'Childobject__c';
           var action = 'Edit';
           var fieldsetName = 'Myfieldset name';
           
          if(recordIds!='')
          {
              Redirect(recordIds,Objectname,action,fieldsetName);
          }
          else
          {
            alert('Please select a record.');
            window.history.back();
          }
            };
      </script>
 <apex:form >
 <apex:actionFunction action="{!Redirect}" name="Redirect" rerender="none">
   <apex:param name="recordIds" assignTo="{!recordIds}" value=""/>
   <apex:param name="Objectname" assignTo="{!objectName}" value=""/>
   <apex:param name="action" assignTo="{!action}" value=""/>
   <apex:param name="fieldsetName" assignTo="{!fieldsetName}" value=""/>

 </apex:actionFunction>
   

  </apex:form>
</apex:page>

 

how to reference user lookup field ID on account from contact in the Batch Apex

Object: Account 
Field:  1:- field A 2:- field B  

Object: Contact
Field:   Contact: Field C

When entering in Field A then Field B  will get Automatically update as Field A
Then in Contact Object which is related to This Account 
Then Field C will also get Update as Field A  
When I run the batch. 

Example:
Account Name = Test1   
Field A  = Test 
Field B  = Test   (Same as Field A)
Inserted Contact Related to Test1 Account  
Contact Field: Field C  = Test 


Many Thanks :) 
 
How to create Opportunity Owner in lightning?(Apex and cmp(controller, helper) User-added image
I know that there is a thread similar to this but the solution to get what I am trying to accomplish does not seem to be the same.

I am a newbie to sales force and in the initial stages of trying to build it out to replace another tool we use. Currently what I am trying to accomplish of for our contact information, which has both our clients and, in many cases, the opposing party information in it. 

In the contact Object we have an option field with with  a few different options that tell us what sort of contact this is (potential client, client, opposing party and so on). All new contacts are created as “Potential Client” once that person hires us 2 things happen (1) we change the contact type in the drop down from Potential Client to Client & (2) we send out an email template from a button titled new hire. 

The email is from a conga composer template which is not relevant to this question.

What we want to happen is for all of the contact information the is in the contact tab/object to auto populate into a different tab/object (Cases) and for it to create a “New Case with a firm specific unique identifier. 

I have the case tab built out with some of the fields already in place; including the unique identifier field. What I am wondering is what I would need to do to either transfer all of the contact information into the case object and could this be created to happen when the “Client Type” is changed, or would it need to be an additional section of syntax in the “New Hire” Button that triggers the email mentioned above?

I hope this makes sense. 

Thank you again.

Eddy
I Have a formula field with a hyperlink as below
HYPERLINK("/"+ Product_Code__c , Product_Code__r.ProductCode)
In my apex code I need to assign the value of this field to a variable but when I debug this variable it shows a value as
partNumber=<a href="/01t50000002NUfX" target="_blank">PBF012D3-03</a>

I want to assign the value to the variable, not in the form of a url.

 
I have a process builder that creates a case when a certain object record is created. I have a field on the case that I want to use to reference this newly created object record. How can I update this field so it references the record that the case was just created for using process builder?
Hello,

When using the "Log a Call" feature, we would like for our users to select from a picklist when using the "Subject" field. While the "Subject" field type currently shows as being a picklist, it is anything but that. 

The reason we are trying to force our users to select from a picklist is so that we have continuity with naming conventions and more efficient reporting. The stardand "Subject" field allows users to free-form type anything they want, limiting our ability to have strong and concise reporting. 

Because of this, I created a custom field called "Log a Call Subject" with the field type as picklist. This allowed us to achieve what we wanted from a continuity perspective, however we experienced a data gap when we noticed that the values for "Log a Call Subject" we not visible in the Past Activites section on landing pages (for example on the Account or Contact objects). Rather, each activity was still showing the "Subject" for the header, when we would like for it to show the new custom field I created "Log a Call Subject". I tried editing this compact layout to replace the "Subject" with "Log a Call Subject" without success. We also noticed a gap in the reports we subscribe to (Call Reports) where we had both columns ("Subject" and "Log a Call Subject") next to each other and only the "Subject" field was hyperlinked. This led us to believe that if we wanted to have clickthrough functionality, that we would be forced to use the standard salesforce field "Subject". 

Long story short, if possible, I would like to consolidate the number of fields we're using ("Subject" and "Log a Call Subject") and only use one (preferablly the standard salesforce "Subject" field). Is there any way to modify this field to be a true picklist with the ability to have field dependancies via development?

Thanks so much!
SD
Is there any way to query all the fields in a Salesforce data object via Ant or the META API? I see plenty of solutions that perform queries via the Apex Developer Console, but I'm looking for a command-line way to achieve this in Ant or META if possible.
I have a Text Area field where in use enters the data, I need to split that in the flow (may be based on space) , can anyone help here , can I use formula fields to accomplish this

​Thanks
Hi All,
Below is my apex class and Vf page, to display list of all Sobjects in My org.. Now Suppose, If i select Account from Dropdown, i need to display all the list of all the account name in my org... how it will be done

public class ObjectList
{
public String Value{get;set;}
public List<SelectOption> getName()
{
List<Schema.SObjectType> gd= Schema.getGlobalDescribe().values();
List<SelectOption> options = new List<SelectOption>();
for (Schema.sobjecttype b: gd)
{
options.add(new SelectOption(b.getdescribe().getlabel(),b.getdescribe().getlabel()));
options.sort();

}
return options;
}
}


VF page:

<apex:page controller="ObjectList"> <apex:pageBlock title="ObjectList"> <apex:form id="pageload"> <apex:pageBlockSection > <apex:selectList value="{!Value}" size="1"> <apex:selectOptions value="{!Name}"> </apex:selectOptions> </apex:selectlist> </apex:pageblocksection> </apex:form> </apex:pageBlock> </apex:page>
Help please, I test the SOQL query in developer Console, and work as expected But, i get error message  in the VF

My Controller is: 

public class InventoryReport {

     public List<Articles_Containers__c> allproduct{get;set;}

     public InventoryReport() {

    AggregateResult allproduct = [
      SELECT Product_Hiden_Name__c, UM__c ,SUM(On_Hand__c)onHand,  SUM(Pending__c)pending,  SUM(Available__c)avail 
      FROM Articles_Containers__c 
         GROUP BY Product_Hiden_Name__c , UM__c 
         HAVING SUM(On_Hand__c)>0
          ORDER BY Product_Hiden_Name__c, UM__c
      limit 1000];

      }

}

VF Page is:

<apex:page controller="InventoryReport" showHeader="true" RenderAs="PDF">
<div class="table">
       <div class="tableHeader">
              <th>Item</th>
              <th>Unit Of Measure </th>
              <th>On Hand </th>
              <th>Pendig </th>
              <th>Available </th>
      </div>
<apex:repeat value="{!allproduct}" var="a"> <!-- <div class="tablebody"> -->
<tr>
   <td>{!a.Product_Hiden_Name__c }</td>
    <td>{!a.UM__c}</td>
    <td>{!a.On_Hand__c}</td>
    <td>{!a.Pending__c}</td>
    <td>{!a.Available__c}</td>
</tr>
  </apex:repeat> </div>
</apex:page>
I'm struggling to understand this concept.

We have a custom object (Intake__c) that is the master in relationships with other objects (Income__c, Non_Cash_Benefits__c etc.)

I need to be able to create a custom button from an Intake Record that can create a pdf of the Intake Record as well as display fields from records within the related list. Just showing the related list in the pdf does not suffice which is what he currently have.

What is the easiest way to do this? Would I need to create extensions for all the related objects where the id on the Intake Record is the same as the ID on the child records and add them to the standard controller for Intake__c? Then in the VF page layout use an apex:repeat value to displays fields from the multiple records associated to the intake?

If so, could someone help me out with what the basic code for this would look like?

Thanks,

Adam
Hi guys,

We have developed a custom lightning component form by utilising the lightning:recordViewForm and lightning:recordEditForm. The component works fine in our development org and tested in napili community as well. We then packaged the component as managed package and install into our development org.

We encountered a weird behaviour when testing the component in napili community. The fields came up correctly in community builder for both recordViewForm and recordEditForm.

User-added image

However, the fields will not be rendered when we view the page as community user. The community user profile has the permission to edit contact details and has the read/edit permission on Mobile Phone and Birthdate fields. 

User-added image

Any help is much appreciated!
Hey Everyone!

I've been an admin with my Org for the last year and I'm uncovering some things that consultants have done in my Org prior to my arrival. I don't know much about development, so I'm hoping you might be able to help. I appreciate any help!

1. The consultant who created this trigger is no longer providing services, but still receives error notifications. His user is inactive, so I don't know how he's still receiving these. 

2. He created a trigger on Tasks that he called "TaskEventListener." I'm not sure what this does or if it's even necessary. He received an error email alert from this trigger. Error shown below in italics.

Subject: Developer script exception from IPC Inc. : TaskEventListener : TaskEventListener: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 006d000000WwBA0AAN; first error: FIELD_CUSTOM_VALIDATION_EXCEPTI...

Apex script unhandled trigger exception by user/organization: 005d0000003NkdD/00Dd0000000eKKE

TaskEventListener: execution of AfterUpdate

caused by: System.DmlException: Update failed. First exception on row 0 with id 006d000000WwBA0AAN; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, The Opportunity field &quot;Follow Up Date&quot; cannot be overdue. Please update to Today or another day in the future. Note: If you receive this error while editing a Task, you must first go to the related Opportunity and update this required information.: []


Here's the code to the Trigger:
1trigger TaskEventListener on Task (After Insert, After Update) {
2  if(trigger.IsAfter){
3    TaskUtility.PopulateOpportunityNextStep(trigger.new);
4    TaskUtility.PopulateAccountNextStep(trigger.new);
5  }
6}

 
Hello guys, I encounter a problem with updating field value without submit button. Due to buisness requirements I have to add visualforcepage onto CustomObject layout for one of its recordtypes. Page has checkbox which must be updated directly from page (I know that I can put this field on the layout, but visibility logic is quite complicated so it is way easier to drive visibility from ApexLevel). The problem is I can not add  submit buton, and it has to be updated on change.
User-added image
This is my page & controller:
public class RemoteObjectExtension {
    
    public ApexPages.Standardcontroller standardController;
    public RemoteObject__c contextObject {get;set;}
    public boolean valueOfCheckbox {get;set;}
    
    
    public RemoteObjectExtension( ApexPages.StandardController controller ){
        this.standardController = controller;
        this.contextObject = (RemoteObject__c)standardController.getRecord();
    }
    
    public void updateRemoteObject(){
        system.debug( logginglevel.info , ' Value from VFP: ' + this.valueOfCheckbox );
    }

}
 
<apex:page standardController="RemoteObject__c" extensions="RemoteObjectExtension">
    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <head>
            
        </head>
        <body>
            <div id="wrapper">
                <apex:form>
                    <apex:outputLabel value="{!$ObjectType.RemoteObject__c.fields.Faulty__c.Label}"/>
                    <apex:inputField id="faultyChbx" value="{!RemoteObject__c.Faulty__c}" onChange="updateRemoteObject()"/>
                    
                    <apex:actionFunction action="{!updateRemoteObject}" reRender="wrapper" name="updateRemoteObject">
                        <apex:param name="valueOfCheckbox" assignTo="{!valueOfCheckbox}" value="{!RemoteObject__c.Faulty__c}"></apex:param>
                    </apex:actionFunction>
                </apex:form>
            </div>
        </body>
    </html>
</apex:page>

but problem is I can not see changes in debug logs. I know that it might be caused by a fact that I am taking value from CustomObject, and I've tried approach with document.getelementbyid('ID').value but it also does not work. Any ideas?