• MUHAMMED SEMIN P N
  • NEWBIE
  • 35 Points
  • Member since 2018

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 22
    Replies
I have a custom object named "Internal Assets" which has several related lists.
There is a pick list field in Internal Assets which conditionally creates a related list.
The picklist values are the following:
User-added image
When the desktop option is selected, a record is created in the related list.
However, I don't want to see all the related lists below:
User-added image
I would like to see only the related list which is related to the picklist item that is selected.
I believe that might happen using visualforce page. However, I am not sure how to set the conditional code (if exists) for that.
Any ideas?
Hi Guys,

The functionality i'm trying to perform here is to update the parent object status to complete when all related child object records have a status complete. But i'm receiving the error "Error: Compile Error: Variable does not exist: id at line 11"

I'm pasting the code below. Can you please help me out here. Thanks!!

trigger updateParentStatus on Child_Object__c (after insert, after update) {

    Set<Id> parentIds = new Set<Id>();
    Integer count = 0;

        for(Child_Object__c wd: Trigger.new) {
            parentIds.add(wd.Parent_Object__c);
        }
    
    List<Parent_Object__c> parentList = [Select id, Status__c from Parent_Object__c where id =: parentIds];
    List<Child_Object__c> childList = [Select id, Status__c from Parent_Object__c Where parentIds =: parentList.id];
    
    for(Child_Object__c wd: Trigger.new) {
        if(wd.Status__c != 'Completed') {
            count++;
        }
    }
    
    for(Parent_Object__c wo: parentList) {
        wo.Status__c = 'Completed';    
    }
    
    if(count==0) {
        update parentList;
    }
}
 
Hi Team,
Requirement : Update Parent Object status based Task ?
Parent Object - A
Child Object - Task
Suppose one parent record has 2 tasks, if the 2 tasks status is completed then update status on parent A to completed other wise update to pending..
How can we do this using trigger or some other way.

Please let me know.

Thanks,
Lakshmi
 
Hello All,

Kindly give the suggestions on my scenrio:

I am creating a Custom object (Registration form) here i am make Vfpage also and i want to save the data into the database via VF Page;
Here i am using apex class and VF page(IT WORKS FINE)
Now i want to use some Radio button on it like Gender==Male and Female in Radio Button,so on this i have to create the datatype???
As i have to save the records in database through VF page entry.

public class BuilderSaveClass {
    
    public string name                         {set;get;}
    public string location                    {set;get;}
    public string state                     {set;get;}
    public boolean ActiveStatus             {Set;get;}
   // public list<SelectOption> country       {set;get;}  
    
    public void saveMe(){
       // country=new list<selectOption>();
        //country.add(new SelectOption('India','India'));
          //  country.add(new SelectOption('UK','UK'));
        Builder__c     bc=new Builder__c();
        bc.Name=name;
        bc.Location__c=location;
        bc.State__c=state;
        bc.Active__c=ActiveStatus;
            insert bc;
    }
    
    
    public void cancelMe(){
        name=null;
        location=null;
        state=null;
        ActiveStatus=null;
        
        
    }
}

VF PAGE
<apex:page controller="BuilderSaveClass">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons location="top" >
                <apex:commandButton value="saveMe" action="{!saveMe}"/>
                <apex:commandButton value="Cancel" action="{!cancelMe}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection columns="1" id="id">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Name"/>
                    <apex:inputText value="{!name}"/>   
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Location"/>
                    <apex:inputText value="{!location}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    State:<apex:selectList size="1" value="{!state}">
                    <apex:selectOption itemLabel="None" itemValue="None"></apex:selectOption>
                    <apex:selectOption itemLabel="Delhi" itemValue="DElhi"></apex:selectOption>
                    <apex:selectOption itemLabel="UP" itemValue="UP"></apex:selectOption>
                    <apex:selectOption itemLabel="PUNJAB" itemValue="PUNJAB"></apex:selectOption>
                    </apex:selectList>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem>
                    ActiveStatus:<apex:inputCheckbox value="{!ActiveStatus}"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
        
    </apex:form>
</apex:page>
//This is an extension controller class
public class Speaker_conf_extension {

     private final Speaker__c speaker; // speaker__c is custom object and standard controller which is using This(Speaker_conf_extension)                                                                           //extension class
     
      private ApexPages.StandardController sController;
    
    public Speaker_conf_extension(ApexPages.StandardController scontroller) {
    
    this.speaker= (speaker__C)scontroller.getRecord();
    this.scontroller = scontroller;
    
    }

public PageReference save() {
..................................
...............................
...............
return null;
}

This extension_controller is trying to over ride Save button and insert an InputFile field to upload image.
I didn't understand what the  constructor of extension_controller is doing . Please explain the behaviour ,Thank you 
I'm trying to write a formula field on Opportunity object involving 2 fields - Amount, and a custom number field, License_Period_months__c. The goal is to calculate an amount based on 3 different scenarios of contract length:

Logic:
 
If
License_Period_months__c = 12, Amount
 
If
License_Period_months__c = 24, Amount * 2 * .15
 
If
License_Period_months__c = 36, Amount * 3 * .30

I am not sure of the correct way to write the formula involving the IF statements, as I keep getting errors. I'm attempting to do this on a formula (currency) field type on opp. thanks!
Hi we are using javascript remoting in visualforce pages. There is a method in javascript that is passing a password in encrypted form using btoa function. Then this data is recieving by one Apex method which is annotated by @remoteAction. But how i can decrypt that password in Apex. Please help in this.
Hi Experts,

I have total 130 fields on case record , i need to check old value and new value if i find any difference in these 130 field values then i need to update case status to new. can anyone help me out. please. Thanks in advance
Hello Developers,

Whenever I created a product from the visualforce page I want set picklist value. In product object, I created one picklist filed name like product_type__c. Simply I want to create a product from vf page and for that product, I have to set product type. 

Regards,
SFDC16
  • August 11, 2018
  • Like
  • 0
How to call an Apex class / method from Salesforce Visual Workflow?

Hello Everyone, 

I created a approval process and 2 users are assigned for approved the request .After appove the request from user  ,other profile user are getting notification after approved the request. 

how to stop that email notification.

Hi, 

  I want to create a record lock when "Opportunity stage is StageEQUALSClosed Lost,Closed Other,Closed - Cancelled,Closed Other Renewal,    record must be locked, except for system administer profile.  Please suggest me how to do record lock when this conditions are met. 

Thanks
Sudhir
  • August 09, 2018
  • Like
  • 0
I have a custom object named "Internal Assets" which has several related lists.
There is a pick list field in Internal Assets which conditionally creates a related list.
The picklist values are the following:
User-added image
When the desktop option is selected, a record is created in the related list.
However, I don't want to see all the related lists below:
User-added image
I would like to see only the related list which is related to the picklist item that is selected.
I believe that might happen using visualforce page. However, I am not sure how to set the conditional code (if exists) for that.
Any ideas?
HI, Salesforce experts:

We have following requirement. Salesforce sends out email, recipient replies to the email then salesforce updates the associated case status via workflow field update, at last case assignment rule should be triggered via apex trigger upon the case status update. All work well except the apex trigger is not fired, which breaks whole process and case assignment rule is not invoked at all. But based on the salesforce document, the workflow field update can fire the after trigger. Any idea?

Thank you!

Roy
 
Hello guys! 

I need help with a process builder rule that would help with the following:

*When an email comes into a closed case that is less than 14 days, we want to reopen the case.*  

Can anyone assist with this?  Thanks in advance!