• Pradeep Kumar L.G
  • NEWBIE
  • 218 Points
  • Member since 2011
  • Architect


  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 43
    Replies
Hi

In Opportunity, I wish to create a custom field like 'StageName' having a similiar function and layout as in the screenshot:

User-added image

1. How can create such field? 
2. If this is not possible I've a question why such different layout/function for this field alone (StageName) ?
  • October 22, 2015
  • Like
  • 0
In Trailhead, next to the List Views, there is a settings cog and over on the right there is a filter button.  These are both missing.  Any ideas what may be causing this issue?  

What I expect:
User-added image

What I get:

User-added image
Please help me with this one...

I wrote a batch the will delete all records in a called sobject.  Here is the code...
 
global class Delete_Batch implements Database.Batchable<sObject>
{

    String query, value, field;
    
    global Delete_Batch(string s)
    {
        Query=s;
        //query = 'SELECT Id FROM Delete_Batch_Test__c';
    }
    
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
       return Database.getQueryLocator(query); 
    }
   
    global void execute(Database.BatchableContext BC, List<sObject> scope)
    {
        Delete Scope;
    }
     
    global void finish(Database.BatchableContext BC)
    {
    }
}

My Test code isn't working though because I have problem with declaring the sobject as a variable.  Please help...
 
@IsTest
public class testDelete_Batch {

    static testmethod void insertTask()  {
    
    Task t = new Task();
    Task t2 = new Task();
    
    t.status='Not Started';
    t.Priority = 'High';
    t.Description = 'Description';
    t.activitydate = system.today();
    
    insert t;
    
    t2.status='Not Started';
    t2.Priority = 'High';
    t2.Description = 'Description';
    t2.activitydate = system.today()-15;
    
    insert t2;
    
    t.Description= 'Visit';
Update t;
//Id batchInstanceID = Database.executeBatch(new Delete_Batch());
Delete_Batch_Method(task,1);
Delete t;
    }}

Thanks.

Kevin
Hi, when I try to connect from nodejs, I am getting the error 'API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner"'. Please help me on the issue. Note: currently I am using 30days trial account and this is developer account.
Hi guys,

I am trying to override the custom Accounts tab with a VF page. (see code below)

But when I go the override properties for the accounts tab, I cannot select my VF page as it does not appear in the list.

I know the standard controller needs to be included, which it is, but it is still not working.

Could anybody provide help on this?

Thanks

<apex:page standardController="Account" showHeader="true"
             tabStyle="account" >
     <apex:tabPanel switchType="client"
                    selectedTab="tabdetails"
                    id="AccountTabPanel">
        <apex:tab label="Details" name="AccDetails"
                  id="tabdetails">
           <apex:detail relatedList="false" title="true"/>
        </apex:tab>
        <apex:tab label="Contacts" name="Contacts"
                  id="tabContact">
           <apex:relatedList subject="{!account}"
                             list="contacts" />
        </apex:tab>
        <apex:tab label="Opportunities" name="Opportunities"
                  id="tabOpp">
           <apex:relatedList subject="{!account}"
                             list="opportunities" />
        </apex:tab>
        <apex:tab label="Open Activities" name="OpenActivities"
                  id="tabOpenAct">
           <apex:relatedList subject="{!account}"
                             list="OpenActivities" />
        </apex:tab>
        <apex:tab label="Notes and Attachments"
                  name="NotesAndAttachments"
                 id="tabNoteAtt">
           <apex:relatedList subject="{!account}"
                             list="NotesAndAttachments" />
        </apex:tab>
     </apex:tabPanel>
  </apex:page>
HI 

create one inputtext field and one submit button in that time i am entering any sobject in inputtext field and clicking submit button then i want to display enter sobject related data........
Upon executing a task before insert trigger, I am trying to update an activity custom field  "Assigned_Region__c" by concatenating two text field values derived from the user.
Looking @ the code below, when I create a task, then look @ the debug logs, strConcatenate appears concatenated correctly- I get the values I'm expecting.  However, on the next line of code, when I try to  assign strConcatenate value to the Assigned_Region__c field (Type:  Text Area(255)), nothing happens - the field never populates with the value from strConcatenate once the record is inserted, nor do I get any errors.  I have checked that the field level security is set to be visible to all profiles including mine.  Any thoughts as to the cause?  Thanks in advance for your help - Bronco.

CODE:

trigger UpdateAssigned on Task (before insert) {
    String tskAssigned;
    for (Task tt : Trigger.new)
    {      
     tskAssigned = tt.Owner.Id;
        String uProf =  [SELECT Profile.Name FROM User WHERE id =: tskAssigned LIMIT 1].Profile.Name;//uProf stores user Profile Name
        String uRegion =  [SELECT Region__c FROM User WHERE id =: tskAssigned LIMIT 1].Region__c;//uRegion stores user Region 
        String strConcatenate = uProf + ' ' + uRegion;
        system.debug('strConcatenate= ' + strConcatenate);//debug log shows "SADMIN East" which is what I expect
        tt.Assigned_Region__c = strConcatenate;
    }
}


Hi all,
I have a custom setting list with two custom fields. I entered  9 entries of data.
User-added image
I want to display 9 items for one user and 8 for all of the rest. Is this possible to do with a list?

Thank you,

Greg
 
I am trying to finish my Visual Force page with the presentation of Related List information.  I have the Standard Object (Account) and Custom Object (Account Document) in a Master Detail scenario as stated in Schema Builder:  Master-Detail Relationship from AccountDocument to Account.  The AccountDocument Related List is successfully displayed on my Account Page Layout.  
When I am on my VF Page I can successfully add the Related List for Contacts but when I go to add the Related List information for AccountDocument, I get error messages but no matter my approach.  One example of an error message:  Visualforce Error:  'AccountDocument__r' is not a valid child relationship name for entity Relationship.  Again, this is one example of a method I have used to try and get the information displayed.  Am I trying to display infomation that cannot be displayed?  
Thank you in advance for any insight that you could provide.
Hi All,

I have two objects like Patient1__c(Parent) and Patient2__c(child) and Master-Detail relationship b/w them.
Now i want to diplay ActivityHistories of Patient2__c in Patient1__c object related list. Patient1__c detail page is custom page.
I written a page for ActivityHistories of Patient2__c and that i want to put it in Patient1__c detail page. Trying to use <apex:include > component. but showing some error like " Id value a021a000002wbSa is not valid for the Patient2__c standard controller ".

page for ActivityHistories : 
<apex:page standardController="Patient2__c"> <apex:relatedList list="ActivityHistories" title="Communication History" id="ch"/> </apex:page>

page for Patient1 view:
 <apex:page standardController="Patient1__c"> 
<apex:include pageName="myPage"/>
</apex:page>

I need solution without using of apex class. Please help me.


Thank you.
Rakesh.S
Hi,
   Please tell me what is the difference between NAME and NAMESPACE in VF PAGE.



Thanks
Ranga
 
How can i enable "Typeof" for my organization?
Error - “SOQL TYPEOF expressions are not supported in this organization”

 

When updating Lead into SFDC by my C# integration, I meet CANNOT_EXECUTE_FLOW_TRIGGER currentlly. And I find out that it is a known issue and fixed.

But I've no idea how to change my code. Could anybody share me any suggestions?

Thanks

  • October 27, 2015
  • Like
  • 0
Hi all,
Please help in writing test code coverage for following code.

if(extension != 'csv' ||extension != 'CSV')
        {
            ApexPages.Message errormsg = new ApexPages.Message(ApexPages.severity.ERROR,'The file must be in comma delimited format (.csv). Please upload an appropriate file format.');
            ApexPages.addMessage(errormsg);
            return null;
        }

Thanks in Advance.
Hi team, 

We have created a custom object, the data for this object is displayled as a related list on the Lead layout page.

A Custom button on the related list isn't required and Id like to remove it from view.  How do I go about doing that?
The lightning exp link couldn't been find on Setup page.
Hi

In Opportunity, I wish to create a custom field like 'StageName' having a similiar function and layout as in the screenshot:

User-added image

1. How can create such field? 
2. If this is not possible I've a question why such different layout/function for this field alone (StageName) ?
  • October 22, 2015
  • Like
  • 0
In Trailhead, next to the List Views, there is a settings cog and over on the right there is a filter button.  These are both missing.  Any ideas what may be causing this issue?  

What I expect:
User-added image

What I get:

User-added image
Hello Everyone,

I have picklist field country on visualforce page ,whenever user selects the USA on the page , i need to show two fields extra on the page.
Below is the code ,but i am not able to get that 

<apex:pageBlockSection>
<apex:inputField value="{!XXX.Country__c}" />
</apex:pageblocksection>
<apex:pageBlockSection>
<apex:inputField value="{!XXX.XXX}"  />
            <apex:inputField value="{!XX.XXX"/>

<apex:pageBlockSection>

can you please help me out.

Thanks for the Help.


Regards,
Jyo
I've created a custom field on a custom object that I'm referencing on my VF page and its not showing up. I basically had a field there that i've re-created with the same field level security and view field accesiblity but for the life of me, can't figure out why the original field works and this one will not. Anything else I can check? I'm not receiving an error in VF so I know the field is referenced correct, has to be some setting? 

Field that works: {!rfp.Order__r.Customer__r.Name}
Field not working: {!rfp.Order__r.Customer__r.Customer__r.Co_Op_Name__c}

Any thoughts would be much appreciated, thank you. 
Please help me with this one...

I wrote a batch the will delete all records in a called sobject.  Here is the code...
 
global class Delete_Batch implements Database.Batchable<sObject>
{

    String query, value, field;
    
    global Delete_Batch(string s)
    {
        Query=s;
        //query = 'SELECT Id FROM Delete_Batch_Test__c';
    }
    
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
       return Database.getQueryLocator(query); 
    }
   
    global void execute(Database.BatchableContext BC, List<sObject> scope)
    {
        Delete Scope;
    }
     
    global void finish(Database.BatchableContext BC)
    {
    }
}

My Test code isn't working though because I have problem with declaring the sobject as a variable.  Please help...
 
@IsTest
public class testDelete_Batch {

    static testmethod void insertTask()  {
    
    Task t = new Task();
    Task t2 = new Task();
    
    t.status='Not Started';
    t.Priority = 'High';
    t.Description = 'Description';
    t.activitydate = system.today();
    
    insert t;
    
    t2.status='Not Started';
    t2.Priority = 'High';
    t2.Description = 'Description';
    t2.activitydate = system.today()-15;
    
    insert t2;
    
    t.Description= 'Visit';
Update t;
//Id batchInstanceID = Database.executeBatch(new Delete_Batch());
Delete_Batch_Method(task,1);
Delete t;
    }}

Thanks.

Kevin
Hello, I am having problems with this query producing a Run Time error and I am not sure why.  Any help would be appreciated.

             List<AggregateResult> quotes = new List<AggregateResult> ();
            quotes = [ SELECT Quote.Account.Owner.Name, COUNT (id) FROM Quote WHERE Scheduled_Phone_Interview__c=THIS_MONTH  GROUP BY Quote.Account.Owner.Name ];
            
            for (AggregateResult quote:quotes){
                //Do something
            }

It compiles fine but I get a non-discript error:

SQLException in Class.CyberSn.MonthlyReport.<init>: line 24, column 1 Class.CyberSn.<init>: line 3, column 1 
Class.CyberSn.MonthlyReport.<init>: line 24, column 1
Class.CyberSn.<init>: line 3, column 1
     
Before Summer 15, I used

 Account.IsPartner = true;

Sometime this approach ran into weird code exception. but It did work for most time.

Now in sandbox with Summer 15. the same code is broken.  it already runs into exception

System.SObjectException: Field is not writeable: Account.IsPartner 
How are requests to http://mycompany.force.com/services/apexrest counted (or not counted) as page views? These are calls to Apex REST services made available via a Site. These DO take an API call, but do they take a Sites page view too?

Can someone from Salesforce please help get this answered for me? It's an answer that belongs on the help article linked in this post.

https://help.salesforce.com/HTViewHelpDoc?id=sites_limits.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=sites_limits.htm&language=en_US)
  • April 22, 2015
  • Like
  • 0
Hello,

I am working on a mule flow that use a salesforce connector.

My question is that how to define a lookup relationship when using this connector when doing a bulk upsert (job list in Bulk Data Load Jobs)

The salesforce connector is using the https://test.salesforce.com/services/Soap/u/28.0 api.
My problem is that on my object I have a lookup and the upsert is working only if I use for this field the sfObjectId of the lookup object.

I would like to be able to use the externalId of my lookup object instead, but can't find the correct xml expression for it.


Trying to upsert an Account record with the field " Parent", lookup field, mapped to an external Id on Account. It works fine when there is a valid value. If the value is blank, it throws an error sayin"INVALID_FIELD, No fields provided in an external foreign key reference in entity: Account". It works fine when I used Dataloader. The issue is with CastIron and Soap UI.