• Phillip Southern
  • SMARTIE
  • 605 Points
  • Member since 2013
  • clicks 2 code


  • Chatter
    Feed
  • 18
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 165
    Replies
I have requirement that i have a object with 2 field topic name and topic description. in 1 vf pafe after clicking on topic name i have to show a page where topic name and description will come as chatter feed . i have to show comment and like also.
could any one tell me how to do chatter .
Hi
Actually my scenario is to display the total price,list price,quantity,discount in VF page. I want to perform dynamic operation for those field that is before saving itself i want to display the total price. I tried that in java script but its not working. Can any one help me out to solve this issue.
I want to display like thisUser-added image

Thanks in advance
On this module, specifically on the Apex Rest Callout unit, I feel like this following challenge instruction could be misleading.

    •    The 'getAnimalNameById' method must call https://th-apex-http-callout.herokuapp.com/animals/:id, using the ID passed into the method. The method returns the value of the 'name' property (i.e., the animal name).

If someone physically copies that link, removes id but leaves in : then the challenge review will not pass because the request link will post as 
https://th-apex-http-callout.herokuapp.com/animals/:99
instead of the correct 
https://th-apex-http-callout.herokuapp.com/animals/99

The first incorrect link will still perform get for the request, but just blank values in the json response.


 
Hi Guys ,

I have a Requirement please help me out
I have account with 5 checkbox fields   and contact objects with 5 checkbox fields  ,on contacts their is a vf overrided ,when i check the  checkboxes whenever i insert and updates in  contact then it has to be updated in account with according to checkboxes  automatically?


please help me out!!!

Thanks ,
Ram
Just created a Flow script and button to launch it from the Contact object using a Visualforce page to create new cases for our volunteer hotline case management system. All of it works great, but last night some of the volunteers said they would rather not use the script and just create cases by bypassing the Flow script, which is fine with their manager. So today I tried to create an additional button that would bypass the script. I tried several solutions but each failed to bypass the Flow script, tried a Visualforce approach and URL link based button. Each time they launched the Flow. Anyone have any ideas how I can create an additional button on the Contact page to bypass the Flow script and go directly to creating a new Case? 

Hi,

I have many opportunities named as "opportunity 2015" related to an account.

Example :

- Account A : has one opportunity named "opportunity 2015"
- Account B : has one opportunity named "opportunity 2015"

I want to create a process builder to create an automated opprtunity for those accounts for 2016 :
- Account A : process builder will create an opportunity named "opportunity 2016"
- Account B : process builder will create an opportunity named "opportunity 2016"

Do you know want kind of criteria i can enter to create automated oppotunities for 2016 related to the same account?

Thanks.

I've created an Invocable Method but Im getting a failure

Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. <br>A flow trigger failed to execute the flow with version ID 301d0000000LHot

Here is the method
    @InvocableMethod(label='Count_Characters_In_Function' description='')
    public static void processType(KeyValueInv[] kvLst){
//some basic code
//even changed to just putting system.debug
}

I've got an inner class which is basic

public class KeyValueInv {
    @InvocableVariable(label='key1' required=true)
    public String key1;
}

I can select everything as normal in the PB but it fails

Please help?
Hi
How to update opportunity field with product custom field (using trigger).

   
Thanks 
Srikanth.
I have a component that we only show on some layouts for an object.  It has a polling function that monitors changes to the object (an object from a managed package). One function of the polling is to refresh the page when some custom field values change.

I need this refresh functionality now on all layouts for this object, but I do not want to display anything on the actual page in the layouts that do not need it.

What I have tried is to put a public boolean on the controller that says whether or not to render the controls. What this does is hide the controls but leaves a large white space on the page where the controls would be. Of course I do not want this space to show.

Here is a simplified version of my page :
 
<apex:component controller="CustomQuoteMetrics" allowDML="true" >
    <apex:form id="customQuoteMetrics">
        <apex:actionPoller action="{!queryQuote}"  rerender="metrics"  interval="90" />
        <apex:outputPanel rendered="{!refreshQuoteNow}">
        <script>
              window.top.location='/{!quoteID}';
        </script>
        </apex:outputPanel>
        <apex:pageBlock id="metrics" rendered="{!showCustomComponent}">
        </apex:pageBlock>
    </apex:form>
</apex:component>

Any ideas on what I could do differently?
I am a (c#, c++, JavaScript...) developer, but have only been writing apex code on the salesforce platform for about 8 months, so I realize I may not be headed in the right direction.
Hello, I'm trying to create a trigger that updates a CampaignMember status and create a case to a lead in a web to case action, i created a hidden field that comes filled with the campaign Id,but when my triggers is fired it only updates the status of my CampaignMember and don't create the case to the Lead. Someone could help me with that?
trigger ai_WebToCaseLead on Case (after insert) {


List<CampaignMember> listCm = [SELECT Id,Lead.Email,CampaignId FROM CampaignMember WHERE CampaignId = '701190000001F5l'];

    for(Case caso : Trigger.new){
        System.debug('caso');
        for(CampaignMember cm : listCm){
                    System.debug('caso');

            if(cm.Lead.Email == caso.SuppliedEmail && caso.ChaveCampanha__c == '701190000001F5l'){
                cm.Status = 'Respondido';
   				caso.ParentId = cm.Lead.Id;
                update cm;
                update caso;
                System.debug(cm);
                System.debug(caso);
            }
        }
    }
}



Regards!
Lucas
Hi All,
We are trying to integrate SFDC with our system and while trying to fetch an information from a field in SFDC through API , the values are getting fetched in 18 digits instead of hte actual name.

The filed which we are trying is called as Projects which should have names like RBC , Royal Bank of Scotland etc but it shows  like this 006w000000XweAaAAJ ( 18 digits)  in my application instead of the actual data.
How do we get this sorted.
Kindly help.
I'm attempting to set the Contact Owner based on the Account Billing Country using a Custom Setting, Lead_Assignment__c, that maps Country to a User Id. When a Contact is created or updated, the trigger pulls the mapped Country and User Id values from the Custom Setting, finds the Billing Country value from the Account associated with the Contact, and sets the Contact Owner with the User Id that correlates with the Country value that matches the Billing Country.

When I run my trigger, the bolded system.debug show that the Contact Owner values is being set correctly (i.e. the User Id is the User Id mapped to the Billing Country in the Custom Setting), but the field is ulitmately not updated with the correct User Id. Based on field history tracking, it does not look like its being updated at all.
Am I missing something on this trigger?

trigger AssignContact on Contact (before insert, before update) {    
    Set<String> accountSet = new Set<String>();
    Set<Id> contactIdSet = new Set<Id>();
    List<Lead_Assignment__c> lstBillingOwner = [Select ID,Country__c, New_Owner_ID__c FROM Lead_Assignment__c];
    Map<String,String> mpCountryOwner = new Map<String,String>();

    for(Lead_Assignment__c l1 :  lstBillingOwner)    {
        mpCountryOwner.put(l1.Country__c, l1.New_Owner_ID__c);
    }    

    Map<Id,User> mpUser = new Map<Id,User>([Select ID FROM User Where ID IN :mpCountryOwner.values()]);
    Set<Id> accIds = new Set<Id>();

    for(Contact con : trigger.new){
        accIds.add(con.AccountId);
    }

    Map<Id,Account> mpAcc = new Map<Id,Account>([Select ID, Name, BillingCountry FROM Account Where ID IN :accIds]);
    for(Contact con : trigger.new){
        Account act = mpAcc.get(con.AccountId);
        
        if(con.AccountId != null && act.BillingCountry != null){
            if(mpCountryOwner.get(act.BillingCountry) != null){
                con.owner = mpUser.get(mpCountryOwner.get(act.BillingCountry) );  
                System.debug('***** - Updating Owner - New Owner - '+con.owner);
            }
        }
    }
 }



 

I want to build a form in which title of next page and name of record should increment by one. i dont know how to save the value in the controller because every time we direct to new vf page. controller value are getting null .

Example to explain situation:

Page1 :
some detail
Button1: Next          Button2: add another house

If you click on Next it redirects to new page and its value should be 1 which is not a problem
IF you click on add another house the next page title should be house 2 and name of record should be house2  and it direct to same page to create new record.


If he clicks again than it should go to house 3 . 
And if he click to next it redirect to another form which starts from 1. 

Can anyone help me how should i approch this ?            

Thanks

Hi, I'm new to the world of developing and trying to learn all the syntax, have read a few books on the topic and browsed around for the info but can't find a quick reference of these very basic questions.  

I've gotten by largely by modding existing free GitHub and forum provided code.

But I've still got basic questions regarding what some of these symbols mean and when they are used.

For example:  the ! sign.

The $ sign (I think is to call universal components, as I've used it in the $User context).

The " should convey direct text, but I'm not so sure.

The { and the ( are pretty interchangeable to me, but I know that that can't be right.  When would you use one over the other?

Any other advice much appreciated.
I am trying to submit a Case using the java API. When I try to save it, I get the following error:

Record Type ID: this ID value isn't valid for the user: 012E000000023tjIAA

Yet when I query the RecordType with SELECT ID, isactive FROM RecordType where sobjecttype = 'Case' and developername='Complaint_Case' and isactive = true it returns me the following:

true 012E000000023tjIAA.

Stepping through the code, I made sure that the correct id is being returns and it is.

What am I missing? Any insight will be greatly appreciated.


Hi All,
I am trying to display opportunity products on the standard case page layout (The case is related to an opportunity using a look-up)
I am getting the error "Content cannot be displayed: List has no rows for assignment to SObject" I am not a developer and any help would be much appreciated in completing this. I'll owe you some beers at Dreamforce :)

Controller Extension
Public With Sharing Class crossObjectOpportunityInfo {
    Public Opportunity o                {get; private set;}
    Public Case              c              {get; private set;}

    Public List<Schema.FieldSetMember> getFields() {
        return SObjectType.OpportunityLineItem.FieldSets.Display_On_Case.getFields();
    }

    Public crossObjectOpportunityInfo(ApexPages.StandardController sc) {
        this.o = [SELECT Id, AccountId FROM Opportunity WHERE RELATED_OPPORTUNITY__C = :sc.getId() LIMIT 1];

        String queryString = 'SELECT Id';
        List<Schema.FieldSetMember> querySet = SObjectType.OpportunityLineItem.FieldSets.Display_On_Case.getFields();
        for(Schema.FieldSetMember f : querySet) {
            queryString += ', '+ f.getFieldPath();
        }

       
            Id cid = [SELECT Id FROM Contact WHERE AccountId = :o.AccountId LIMIT 1].Id;
            queryString += ' FROM Opportunity WHERE id = \''+ cid +'\' LIMIT 1';
    }

}

VF Page
<apex:page standardController="Case" extensions="crossObjectOpportunityInfo">
<apex:pageBlock title="Opportunity Products">
<apex:pageBlockSection columns="1">
<apex:pageBlockTable value="{!Case.Related_Opportunity__c}" var="line">
<apex:column headerValue="Product">

  </apex:column>
  </apex:pageBlockTable>
  </apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
I've got a front-end, back-end page that takes user input and creates and then displays a SOQL query.  In this the date order is displaying descending.  Can we get it to display in ascending order?  Better yet, if they could click the title of the display column to order it by that critieria that would be even better.