• Rahul_sg
  • SMARTIE
  • 1603 Points
  • Member since 2009
  • SFDC Tech Lead

  • Chatter
    Feed
  • 48
    Best Answers
  • 2
    Likes Received
  • 4
    Likes Given
  • 12
    Questions
  • 399
    Replies
I am referencing the following field on a VisualForce page:

Field Label: Approval Status
Field Name: Traffic_Light
API NAme: Traffice_Light__c
Data Type: Formula    
Formula: IF (AND(Submitted__c, Discount_Approved__c), IMAGE("servlet/servlet.FileDownload?file=01580000001RppU", "Discount Approved"),
IF (AND(Submitted__c, Discount_Denied__c ), IMAGE("servlet/servlet.FileDownload?file=01580000001RppZ", "Discount Denied"), null))

This is what I have on my VF page:
<br></br><b> Approval Status: </b> <apex:outputText value="{!Opportunity.Traffic_Light__c}" />

However, when I launch the visualforce page, the following is populating for the Apporval Status field: 
<img src="servlet/servlet.FileDownload?file=01580000001RppU" alt="DiscountApproved" border="0"/>

But the attached image should be appearing.

I need the image to appear on the VF page. 

I appreciate the help!
User-added image

Hi , I am using Enterprise Licensed version. Currently it is spring 13. How to activate this to Winter 14. and how to test  the testing and de[loyement for this?

  • December 02, 2013
  • Like
  • 0

Is there any limit on number of report folders?

  • November 25, 2013
  • Like
  • 0

Can someone please clarify this ? Thanks

 

Does the following line  'but exclude all your organization’s standard and custom object records, documents, and attachments.' means in Developer Sandbox it is included. ?

 

Configuration-only sandbox

Configuration-only sandboxes copy all your production organization’s reports, dashboards, price books, products, apps, and customizations, but exclude all your organization’s standard and custom object records, documents, and attachments.

 

Developer sandbox

Developer sandboxes are special configuration-only sandboxes intended for coding and testing by a single developer. They provide an environment in which changes under active development can be isolated until they are ready to be shared. Just like configuration-only sandboxes, developer sandboxes copy all application and configuration information to the sandbox.

I am quite new to Salesforce and have not yet any thing like the following.

We have a Paper object which is looking up for authors in Contact object. We want to create to have custom related list of all papers for each of the authors. In other words, when an author is viewed from Contact tab, we want to have a list of his publications in the custom related list. Each paper can have up to 10 authors. If it has 10 authors, the paper should appear in each author's page in custom related list.

Is there any way to create without apex/trigger coding ? (if I need to code, how to create related list from apex? )

Thanks.

 

  • November 05, 2013
  • Like
  • 0

hello friends

               

 i have a sineario that  i need a workflow on account object .if a new account is created in  account object then workflow rule fired for 50days. i need to get email for 1st  to 50 days.every day (1st day or 2nd day)should be display on email. in 51day i would not get the mail ..help me

Hi,

 

I am trying to setup a trigger that fires whenever the owner is changed in a case and the trigger updates the status field.

For some reason, the trigger does not seem to grab the owner field value. Below is my code:

 

trigger OwnerCaseStatus on Case (after update) {

        for(Case cas: Trigger.new){
                Case oldcase = Trigger.oldMap.get(cas.Id);
        If(cas.Owner != oldcase.Owner){
                    cas.Status = 'Open';
   }
}
}

Can someone please point out if I am missing something.

 

Thanks!

Vic

Hi

 

I wasn't able to find this info. How many account records and contact records can be imported in a Salesforce developer edition?

 

Thanks

 

Create a custom object “NEWOPTION” with the following custom fields

Primary-interest Picklist (Reading/Writing/Drawing/Music)

 

Secondary-interest Multi-valued Picklist (Fantasy/fiction/management/modern art/paint/crayon/pencil shading/classical/rock/pop)

 

Conditions

Display secondary fields’ crayon/paint/modern art if primary-interest field Drawing is selected.

Display secondary fields’ classical/rock/pop if primary-interest field Music is selected

Display secondary fields Fantasy/fiction/Management if primary-interest field Reading/Writing is selected

  • October 14, 2013
  • Like
  • 0

Hi All

 

I got stuck with this so I thought of asking it here. Any help would be highly appreciated.

 

Well, I am trying to write a test class wherein an AccountTeamMember record is created. I am not able to assign a value to the UserId. The following is the error:

 

Field is not writeable: AccountTeamMember.UserId

 

The following is the code:

 

@isTest
private class TestFox {
static testMethod void testTriggerContactMAMDforCO() {
Map<String, Id> recordTypes = new Map<String, Id>();
for (RecordType rt : [SELECT Id, SObjectType, DeveloperName FROM RecordType]) {
recordTypes.put('' + rt.SObjectType + rt.DeveloperName, rt.Id);
}


// Create an Entity
Account acct = new Account(name='Test Corporation',Sales_Report_Code__c='5000',RecordTypeId = recordTypes.get('AcctBr'));
insert acct;

// Create an Entity Team
AccountTeamMember atmMD = new AccountTeamMember(AccountId=acct.Id,TeamMemberRole='Marketing Dir', UserId='005E0000000KojD');
insert atmMD;

AccountTeamMember atmMA = new AccountTeamMember(AccountId=acct.Id,TeamMemberRole='Marketing Ass', UserId='005E0000000JaQD');
insert atmMA;


// Create a Contact and assign it an account
Contact con = new Contact(AccountId=acct.Id,lastname='lasty',firstname='firsty',BAD__c=true,RecordTypeId = recordTypes.get('CAD'));

//Now insert data ......
Test.startTest();
insert con;

// Now change the Account's Sales_Report_Code__c and Account Channel
acct.Sales_Report_Code__c='1234';
acct.Channel__c='Company Offices';
update acct;

// Update the Account Team Member users
atmMD.UserId='005E0000000JF9m';
update atmMD;

atmMA.UserId='005E0000000K9aE';
update atmMA;

// Update the contact , any field other than Marketing Dir & Marketing Ass
con.FirstName='firstyyyy';
con.BAD__c=false;
update con;
System.assertEquals(con.Marketing_Dir__c,'005E0000000JF9m');
System.assertEquals(con.Marketing_Ass__c,'005E0000000K9aE');

Test.stopTest();
}
}

 

Any suggestion what can be done better here to eliminate the error? 

 

Thank you

g

I am about to refresh my developer sandbox from the production. I have some crucial data in the developer sandbox.. Want to confirm, will my existing data in the developer sandbox would completely be erazed after refresh.

Is there a place where I can see all the methods that can be used on different data structures? For example, List.add() and other existing methods. And the same for custom objects.

 

-Thanks

 

I am using Salesforce iOS SDK. My app is supposed to display all Salesforce Opportunities which current user follows. Do you know If it is possible to query theme using SOQL. I have been trying something like this:

 

SELECT Id, Name FROM Opportunity

 WHERE Id IN

  (SELECT ParentId FROM FeedSubscriptionsForEntity WHERE SubscriberId = '#id')

 

Unfortunetly I receive error point that there is something wrong with FeedSubscriptionsForEntity.

 

 

We have Email to Case set up and all that works fine, but my users want to be able to reply to these emails, which they can. However, here is where the problems start. On the "Send an Email" screen there is the "Additional To:" field. When I click on the Lookup Icon, I get the "Email Address Lookup"  pop-up window. There is a picklist field on this screen labeled "Show", and the default value is "All Co-workers in Company". In fact, not only is this the default value, it is the ONLY value. I don't want to select a "co-worker", I WANT to select Contacts!  Why can't I see "Contacts" as the "Show:" picklist value? 

I am a developer with admin privs, so is there any way I can:

 

1) change the behaviour of the Email Address Lookup screen through configuration

2) change the behaviour of the Email Address Lookup screen by enhancement

3) completely replace all of the send email functionality? Roll my own?

4) an App in the App exchange that addresses this problem?

 

Thanks for any help.

Mike

 

 

 

I'm getting and error when importing leads using Eloader. I'm using Round Robin Record Assignment modified using the code from here to work on Leads. I also have a trigger and class from this post to fire off the assignment rule since there is no option for that when importing through Eloader. I'm getting the error below when importing a list. When I manually create leads everything is working fine but when I try and import a list using eloader I get this error. I'm still new to apex so I don't get the problem. Any help?

 

FATAL_ERROR System.NullPointerException: Attempt to de-reference a null object

FATAL_ERROR Trigger.leadRoundRobin: line 81, column 1

 

78        for (Integer i : queueIds.keySet())
79        {
80       Assignment_Groups__c[] ags = asgnGroups.get(asgnGroupNameIds.get(i));
81       if (ags.size()>0)
82       {

 

 

 

// leadsRoundRobin.trigger:
 
trigger leadRoundRobin on Lead (before insert, before update) {
 //
    //Check if assignment owner has changed
    //
    Map<Integer,Id> queueIds = new Map<Integer,Id>();   //Trigger index --> Queue ID
    
    Integer idx = 0;
    for (Lead l : Trigger.new)
    {
        if(Trigger.isUpdate) {  
            if(l.OwnerId <> Trigger.oldMap.get(l.id).OwnerId) {
                if (l.TempOwnerId__c == 'SKIP') {
                    Trigger.new[idx].TempOwnerId__c = '';
                } else {
                    queueIds.put(idx, l.OwnerId);
                }
            }           
        }else {
            queueIds.put(idx, l.OwnerId);
        }   
        idx++;
    }
    System.debug('>>>>>queueIds: '+queueIds);
    if (queueIds.isEmpty()) return;
    
    //
    //Find active Assignment Group for Queue
    //
    Map<Integer,Id> asgnGroupNameIds = new Map<Integer,Id>();   //Trigger index --> Assignment_Group_Name ID
    Map<Id,Assignment_Group_Queues__c> asgnGroupQueues = new Map<Id,Assignment_Group_Queues__c>(); //Queue ID --> Assignment Group Queues
    
    for(Assignment_Group_Queues__c[] agq : [SELECT Assignment_Group_Name__c, QueueId__c
                                          FROM Assignment_Group_Queues__c 
                                          WHERE QueueId__c in :queueIds.values()
                                          AND Active__c = 'True'])
    {
        for (Integer i = 0; i < agq.size() ; i++) {
            asgnGroupQueues.put(agq[i].QueueId__c, agq[i]);
        }                                           
    }
    System.debug('>>>>>asgnGroupQueues: '+asgnGroupQueues); 
    if (asgnGroupQueues.isEmpty()) return;
 
    for (Integer i : queueIds.keySet()) {
        Assignment_Group_Queues__c agq = asgnGroupQueues.get(queueIds.get(i));
        
        if (agq <> null) {
            asgnGroupNameIds.put(i, agq.Assignment_Group_Name__c);
        }
        //else no active assignment group queue error
    }
    System.debug('>>>>>asgnGroupNameIds: '+asgnGroupNameIds);
    if (asgnGroupNameIds.isEmpty()) return;
    
    //
    //Determine next valid user in Queue/Assignment Group for round robin
    //User with earliest last assignment date wins.
    //
    Map<Id,Assignment_Groups__c[]> asgnGroups = new Map<Id,Assignment_Groups__c[]>(); // Assignment Group Name ID --> User ID
    for(Assignment_Groups__c[] ags : [SELECT Group_Name__c, User__c, Last_Assignment__c, Millisecond__c 
                                   FROM Assignment_Groups__c 
                                   WHERE Group_Name__c in :asgnGroupNameIds.values() 
                                   AND Active__c = 'True' AND User_Active__c = 'True'
                                   ORDER BY Last_Assignment__c, Millisecond__c])
    {
        if (ags.size()>0) {
            asgnGroups.put(ags[0].Group_Name__c, ags);
        }
    }
    System.debug('>>>>>asgnGroups: '+asgnGroups);   
    if (asgnGroups.isEmpty()) return;
 
    Map<Id,Assignment_Groups__c> updateAssignmentGroups = new Map<Id,Assignment_Groups__c>();
    Map<Id, datetime> latestAGDateTime = new Map<Id,datetime>();
    idx = 0;    
    for (Integer i : queueIds.keySet())
    {
        Assignment_Groups__c[] ags = asgnGroups.get(asgnGroupNameIds.get(i));
        if (ags.size()>0)
        {   
            //Choose next user in line if user ID has already been used but not committed in this trigger batch 
            Assignment_Groups__c ag = ags[math.mod(idx, ags.size())];
                
            //Assign User to Lead as the new owner
            System.debug('>>>>>Owner changed for Lead ' + Trigger.new[i].Id + ' from '+Trigger.new[i].OwnerId+' to '+ ag.User__c);
            Trigger.new[i].OwnerId = ag.User__c;    
            Trigger.new[i].TempOwnerId__c = '';  // don't assign back in an endless loop
 
            //Set last assignment datetime
            datetime now = datetime.now();
            ag.Last_Assignment__c = now;
            ag.Millisecond__c = now.millisecondGMT();
            
            //update only latest Assignment Groups per ID
            if (latestAGDateTime.containsKey(ag.id)) {
                if(latestAGDateTime.get(ag.id) < now) {
                    updateAssignmentGroups.put(ag.id, ag);
                    latestAGDateTime.put(ag.id, now);
                }
            } else {
                updateAssignmentGroups.put(ag.id, ag);
                latestAGDateTime.put(ag.id,now);
            }
            
            idx++;
        }
    }
    //Map --> List/Array for DML update
    List<Assignment_Groups__c> updateAG = new List<Assignment_Groups__c>();
    for (Id agId : updateAssignmentGroups.keySet()) {
        updateAG.add(updateAssignmentGroups.get(agId));
    }
 
    System.debug('>>>>>Update Assignment Groups: '+updateAG);   
    
    //
    //Update last assignment for Assignment Group in batch
    //
    if (updateAG.size()>0) {
        try {
            update updateAG;
        } catch (Exception e){
            for (Integer i : queueIds.keySet())
            {
                Trigger.new[i].addError('ERROR: Could not update Assignment Group records ' + ' DETAIL: '+e.getMessage());  
            }
        }
    }
}

 

  • September 30, 2013
  • Like
  • 0

hi,

Can some one tell me, what is the utility of the 'Freeze' button in the User Detail Page?

 

-Kaity

  • September 23, 2013
  • Like
  • 0

Hello,

 

We are building customer portal and realized there are many internal attachment not marked as private.

To prevent our customer seeing our internal doc, I need to go thgouth each case and mark all as private.

Is there a way to do it with data loader? or if it can't be done with data loader, is therea any way to do it?

 

Also, I was requested to make default = private on all attachment at save.

How can I set default value in prigate field?

 

Thank you for your advise!

When you create a custom button that pre-populates various fields with values, you have to specify the salesforce record ID of the field itself in your button parameters and then put "=" (equals), and then follow that up with your merge field to specify the value of that parameter.

 

Normally I get the record ID by just using Google Chrome, right clicking on the field while in Edit view, clicking "Inspect Element" (which gives me the salesforce ID) and then pasting that ID in my button code as the parameter needing to be populated.  I know that other people go a longer route by going to the object in question, clicking on the field name itself, and copying the salesforce ID from the URL (after the "salesforce.com/" part) to extract the custom field salesforce ID.

 

Both of these methods seem rediculously inefficient.  More importantly though, you're hard-coding the field ID into the button itself.  That means, if your company ever moves orgs, OR if you're creating a packaged app, your button will essentially "break" once it's installed in a new org, because the field ID's in your button parameters will no longer match the ID's that salesforce assignes to those fields once you install that package somewhere else.

 

So my question is this... is there some special trick, either using the "URLFOR" function or something else (formula functon, action, etc), that allows you to dynamically generate the salesforce ID of a field that you need to include in your parameters?

 

Essentially, it would allow your buttons to look something like the following (this example would be a list button for Contacts, placed on the Account page layout):

 

{!URLFOR($Action.Contact.New,Account.Id,[FIELDID($ObjectType.Contact,"Contact_Status__c")="New",retURL=Account.Id],true)}

 

So in the above example, I invented a functon called "FIELDID", which takes the Sobject type and API name of the field on that object, does a DescribeSobject() call in the background, and spits out the salesforce ID of that particular field, as opposed to hard coding it perminantly.  No hunting around for salesforce ID's, no hacks, just using the tools available in the Custom Button section.

 

So... that being said, is there some way to do pretty much that, using the button functions available to salesforce users?  If not, then what is the "official" way that Salesforce recommends you use to go about extracting field ID's for the parameters you use in your custom buttons?

I'm playing with the following example: http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_custom.htm

 

I created both the controller and the page. However, I see an error: http://i.imgur.com/JxJbnMy.png

 

I have *no* idea what went wrong. The question is how to debug this?

 Hi Everyone,

 

I am not able to insert million records.i am keeping the batch size as "100",can we increase this batch size .

Does it apply the governor limits.

or we have any process..

Your organization has processed 2,020 batches in the last 24 hours.  Your organization can process 2,000 batches in a 24-hour period.

 

<beans>
 <bean id="AccountBLR_TEST_Insert_TtoS" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">
  <description>Created by Dataloader Cliq.</description>
  <property name="name" value="AccountBLR_TEST_Insert_TtoS"/>
  <property name="configOverrideMap">
   <map>
    <entry key="dataAccess.name" value="C:\salesforce.com\Data Loader\cliq_process\AccountBLR_TEST_Insert_TtoS\read\AccountBLR_TEST_Insert_TtoS.csv"/>
    <entry key="dataAccess.readUTF8" value="true"/>
    <entry key="dataAccess.type" value="csvRead"/>
    <entry key="dataAccess.writeUTF8" value="true"/>
    <entry key="process.enableExtractStatusOutput" value="true"/>
    <entry key="process.enableLastRunOutput" value="true"/>
    <entry key="process.lastRunOutputDirectory" value="C:\salesforce.com\Data Loader\cliq_process\AccountBLR_TEST_Insert_TtoS\log"/>
    <entry key="process.mappingFile" value="C:\salesforce.com\Data Loader\cliq_process\AccountBLR_TEST_Insert_TtoS\config\AccountBLR_TEST_Insert_TtoS.sdl"/>
    <entry key="process.operation" value="insert"/>
    <entry key="process.statusOutputDirectory" value="C:\salesforce.com\Data Loader\cliq_process\AccountBLR_TEST_Insert_TtoS\log"/>
    <entry key="sfdc.bulkApiCheckStatusInterval" value="5000"/>
    <entry key="sfdc.bulkApiSerialMode" value="5000"/>
    <entry key="sfdc.debugMessages" value="false"/>
    <entry key="sfdc.enableRetries" value="true"/>
    <entry key="sfdc.endpoint" value="https://www.salesforce.com/services/Soap/u/28.0"/>
    <entry key="sfdc.entity" value="Account_BLR_Test__c"/>
    <entry key="sfdc.extractionRequestSize" value="500"/>
    <entry key="sfdc.insertNulls" value="false"/>
    <entry key="sfdc.loadBatchSize" value="100"/>-----Can we increase the Batch size ?any Governor Limits
    <entry key="sfdc.maxRetries" value="3"/>
    <entry key="sfdc.minRetrySleepSecs" value="2"/>
    <entry key="sfdc.noCompression" value="false"/>
    <entry key="sfdc.password" value="f441b413584b5116f80a8187cf4eec85"/>
    <entry key="sfdc.proxyHost" value=""/>
    <entry key="sfdc.proxyNtlmDomain" value=""/>
    <entry key="sfdc.proxyPassword" value=""/>
    <entry key="sfdc.proxyPort" value=""/>
    <entry key="sfdc.proxyUsername" value=""/>
    <entry key="sfdc.timeoutSecs" value="60"/>
    <entry key="sfdc.useBulkApi" value="true"/>
    <entry key="sfdc.username" value=""/>
   </map>
  </property>
 </bean>
</beans>

 

Pl let help me out.

 

Regards

Sailer

  • August 20, 2013
  • Like
  • 0
Hello There!

We have started automating our sfdc scripts using Ruby, Watir & Cucumber. The scripts are working fine in our dev sandbox.
Currently we are referencing the records using record name/Id but we afraid once we refresh our sandbox from the production our scripts will stop working.
Can someone please share best practices using the Ruby cucumber tool to 1) generate test records 2) Reference test records in scripts?

Thanks!
Hello there!

I've created a VF page to create an Opportunity record. I've added this VF page as publisher action on the Account Object.
This VF page is working properly on the browser. However, in the Salesforce1 app the lookup functionality is not working.
The lookup icon is available but after clicking on that icon it opens the lookup page in browser mode and if I select any record on the pop up It takes me directly to that record instead of populating that value in the lookup field.

We have some other publisher actions like creating the Task record where we are not using a VF page. for such standard actions the lookup functionality is working as expected.

Has anyone encountered similar issue? if yes, how to resolve this issue?

Thanks,
Rahul
Hello There!

I've created a trigger on the Event object and this triggers updates a boolean flag on the Event object, if the Event is a multi person event(There are some other business rules that I'm validatiing in the trigger)

The issue here is after inserting the EventRelation record in the test method. It does not update the event record but when I query the event record I see that the IsGroupEvent std field is getting updated to TRUE.

Now if I update the the event record by writing the dml update statement in the test method its changing this flag to false( IsGroupEvent =false)
and because of this my apex code is not getting covered.

I've added the code snippet below:

EventRelation er = new EventRelation(EventId =ev.id,
            RelationId = lead.Id, Status='New' );
            insert er; //inserting EventRelation
          
            ev = [SELECT Id, Subject, ActivityDate, ActivityDateTime,  IsGroupEvent  FROM Event WHERE Id = :ev.Id LIMIT 1];
            system.debug('**ev is*'+ev);
     here in the debug I see the IsGroupEvent(this field is not writable) is set to TRUE.
            update ev;
after this dummy update its changing the flag to false.

any idea why?

Is it possible to override/hide buttons from the chatter IOS app?

https://itunes.apple.com/us/app/salesforce-chatter/id404249815?mt=8

 

In our org we are using VF pages to edit many standard/custom object. In the chatter mobile app they have added feature to edit the records

 

However, while editing its not taking the defined page layout in salesforce also I don't see any settings to hide/over ride that edit button.

 

Has anyone encountered similar issue? Also, what are my options here. Do I need to build my own app if I need such changes?

Hi Friends,

 

Has anyone tried deploying an approval process using a change set?

 

I'm getting the following error while deploying the change set: Process definition: an unexpected error occurred . please include this error id if you contact support : 216187271-8272

 

Any help ??

 

Thanks,

Rahul

Hi Friends,

 

we are experiencing a weird issue from today morning. When we click on the SETUP menu (By clicking on the Name and selecting setup option below My Profile from the dropdown). Its redirecting us back to the login page within a few seconds.

 

This is a standard salesforce screen. From other browsers e.g. crome, firefox we are able to access the SETUP page.

 

Also, we are accessing the sandbox and the page its redirecting us is : https://login.salesforce.com/?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp......................

 

Anyone else experiencing this issue? We use IE7

 

Thanks,

Rahul

Hi Friends,

 

My batch job is failing with the folowing error :

System.UnexpectedException: Error processing messages

 (System Code)

 

In the debug log its pointing to the    Test.stopTest(); line ; which I think has no relation to this issue.

 

My batch job archives the content recods based on business defined criteria. the batch class works fine!

I'm updating ContentDocument records in my batch class. I'm not sure if there is any sfdc limitation on updating this object (ContentDocument) in test run mode.

 

 

 

 

I know we can archive a content document by setting the isArchived field in the ContentDocument object.

However once that document is archived that record disappears from the ContentDocument object.

 

for e.g If I contribute a document/image file by uploading it to any library  .

The following query will bring 1 record.

 Select c.Title, c.PublishStatus, c.ParentId, c.IsArchived, c.Id, c.ArchivedDate, c.ArchivedById From ContentDocument c

 

now If I archive thie document either from UI or programatically the same query doesnot fetch any records.

 

Is there any way to fetch this record using SOQL and set the IsArchived flag back to False?

 

 

1 ) Can we add a flag(boolean field) to Chatter posts so that we can do some calculations/DML for such feeds when they are inserted?

 

Can we add a flag(boolean field) to Chatter posts so that we can do some calculations/DML for such feeds when they are inserted?

Can we setup an approval process in Salesforce for new chatter group creation?

Can we create standard sfdc reports on Chatter feeds? 

I know we can archive a content document by setting the isArchived field in the ContentDocument object.

However once that document is archived that record disappears from the ContentDocument object.

 

for e.g If I contribute a document/image file by uploading it to any library  .

The following query will bring 1 record.

 Select c.Title, c.PublishStatus, c.ParentId, c.IsArchived, c.Id, c.ArchivedDate, c.ArchivedById From ContentDocument c

 

now If I archive thie document either from UI or programatically the same query doesnot fetch any records.

 

Is there any way to fetch this record using SOQL and set the IsArchived flag back to False?

 

 

Can we create standard sfdc reports on Chatter feeds? 

Hello There!

We have started automating our sfdc scripts using Ruby, Watir & Cucumber. The scripts are working fine in our dev sandbox.
Currently we are referencing the records using record name/Id but we afraid once we refresh our sandbox from the production our scripts will stop working.
Can someone please share best practices using the Ruby cucumber tool to 1) generate test records 2) Reference test records in scripts?

Thanks!

Hi all,
 

Need help on getting help text with out using any objects or fields. Please look in to this code snippet

 <apex:page controller="ActionSupFunController">
    <apex:form >
        Click me to call action function method  
        <apex:inputcheckbox onmouseover="openMemberPop()" /><br></br> <br></br>  
        <apex:image onmouseover="openMemberPop()" onmouseout="clearMemberPop()" url="http://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&frm=1&source=images&cd=&cad=rja&uact=8&docid=jdG1dmgwZ2M29M&tbnid=cv1BApg8TUznjM:&ved=&url=http%3A%2F%2Fbyronmiki.com%2F%3Fp%3D432&ei=jvvhU4rTOpKyyATyqoDQDA&bvm=bv.72197243,d.aWw&psig=AFQjCNHTmRYsHjNp76Hvb89XUGuYxNJbKw&ust=1407405327250741 (http://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&frm=1&source=images&cd=&cad=rja&uact=8&docid=jdG1dmgwZ2M29M&tbnid=cv1BApg8TUznjM:&ved=&url=http%3A%2F%2Fbyronmiki.com%2F%3Fp%3D432&ei=jvvhU4rTOpKyyATyqoDQDA&bvm=bv.72197243,d.aWw&psig=AFQjCNHTmRYsHjNp76Hvb89XUGuYxNJbKw&ust=1407405327250741)" />
       
        <script>
            function openMemberPop()
            {
                document.getElementById('MemberPopUp').style.display = 'block';
                document.getElementById('MemberPopUpText').innerHTML = "Commercial associates must authenticate with 2 of the following and Medicare associates must authenticate with 3 ";
            }
            function clearMemberPop()
            {
                document.getElementById('MemberPopUp').style.display = 'none';
                document.getElementById('MemberPopUpText').innerHTML = "";
            }
        </script>
    </apex:form>
</apex:page>

Hi all,

I'm having this issue with my users not being able to sign in to android with SSO. Everytime I have to reset and set their user account to generic Salesforce.com site to have them login in. My users are using Android phone.

Is anyone else having this issue?
hi all,
whenever opportunity is created, then automatically send that record to the external system using outbound messages. is it possible? if it is possible, give some guideline to solve. thanks in advnce
  • June 16, 2014
  • Like
  • 0
is there any limit for Passing parameters from visualforce controller to apex method??
  • May 20, 2014
  • Like
  • 1
Our Standard Opportunity has a Master-Detail relationship our Custom Object, Hi-Level.  The Record Type on Hi-Level is used to change page layouts.  We can successfully get the Record Type to update via workflow when the field changes take place on Hi-Level, but are stumped when our criteria lies on the Opportunity.  When the Standard Field, ‘Stage’, on the Opportunity is changed from ‘Stage A’ to ‘Stage B’, we need the Record Type on Hi-Level to change from 'Private' to ‘Released’. 

Things I've attempted:

1) Created a formula field on Hi-Level that references the Stage field on the Opportunity, and created a workflow on Hi-Level to update Record Type  to 'Released' when the formula field equals 'Stage B'.  The formula field works perfectly, but it appears that workflows cannot update from formula fields.  Is that correct, or I'm a missing a key component?

2) Created a workflow on Hi-Level with a field update to mark a checkbox as True when Stage moves to 'Stage B'.  Cannot get the checkbox marked as True because its appears that Cross-Object workflows will not perform field updates from parent to child.  Am I enterpreting this correctly, or could I be missing something simple?

3) Attempted to created my second option using a workflow on the Opportunity instead of Hi-Level, but fields from Hi-Level are not available when I try to create a field update.

Is there any other way I can accomplish this without an Apex trigger?
Hi , 

i have a custom object PROJECT . I created a visual force page which is a mirror of PROJECT page layout .
now I want the required field validations on the object to be displayed on visual force page. 

I used "required = true" on my input field , it gave me the red bar in the field but when I click save without filling the required field the page does not show error message and the record is not saved. 

Can an any body help me?
I am referencing the following field on a VisualForce page:

Field Label: Approval Status
Field Name: Traffic_Light
API NAme: Traffice_Light__c
Data Type: Formula    
Formula: IF (AND(Submitted__c, Discount_Approved__c), IMAGE("servlet/servlet.FileDownload?file=01580000001RppU", "Discount Approved"),
IF (AND(Submitted__c, Discount_Denied__c ), IMAGE("servlet/servlet.FileDownload?file=01580000001RppZ", "Discount Denied"), null))

This is what I have on my VF page:
<br></br><b> Approval Status: </b> <apex:outputText value="{!Opportunity.Traffic_Light__c}" />

However, when I launch the visualforce page, the following is populating for the Apporval Status field: 
<img src="servlet/servlet.FileDownload?file=01580000001RppU" alt="DiscountApproved" border="0"/>

But the attached image should be appearing.

I need the image to appear on the VF page. 

I appreciate the help!
User-added image

Hello there!

I've created a VF page to create an Opportunity record. I've added this VF page as publisher action on the Account Object.
This VF page is working properly on the browser. However, in the Salesforce1 app the lookup functionality is not working.
The lookup icon is available but after clicking on that icon it opens the lookup page in browser mode and if I select any record on the pop up It takes me directly to that record instead of populating that value in the lookup field.

We have some other publisher actions like creating the Task record where we are not using a VF page. for such standard actions the lookup functionality is working as expected.

Has anyone encountered similar issue? if yes, how to resolve this issue?

Thanks,
Rahul
Hello Helper

I am curious  if is possible  to retrieve the Salesforce ID of a field  of a custom object  throught apex  code (not metadata API)


Regards
csaba
  • December 26, 2013
  • Like
  • 0
How can I delete all the records of a custom object in Developer Edition?

Hi , I am using Enterprise Licensed version. Currently it is spring 13. How to activate this to Winter 14. and how to test  the testing and de[loyement for this?

  • December 02, 2013
  • Like
  • 0

Hi There,

 

Guess its simple but I am a bit confused here.

 

 

Kindly let me know is it possible to customise the pages or build fully custom VF pages in Sales,Service and Marketing clouds of Salesforce.

 

Also let me know if we can implement custom business logic in the above metioned clouds ?

 

Thanks

SFDC Beginner

Is there any limit on number of report folders?

  • November 25, 2013
  • Like
  • 0
The following outbound change set upload failed due to a system error:

Change set: NER change set1 (04tL0000000DV7R)

Organization: NER (Developer Sandbox) (00DL00000028Ftd)

User: Vinay Chaturvedi (005L0000000nU55) Error Number: 1625664562-40227 (152101301)

Please try to upload your change set again. If it does not succeed, contact Customer Support and provide the error number listed above.

 

 

please suggest.

  • November 22, 2013
  • Like
  • 0
I have a custo object  Business. and i have a field  'Amount' on this object. On Account i want to display average of this  'Amount' field. I have created a Roll Up on Account but it was giving only Count , SUM,MIN,MAX. Then How to calculate Average? for this
  • November 22, 2013
  • Like
  • 0

Can any recommend a free SOAP UI tool?

 

Thanks!

Can someone please clarify this ? Thanks

 

Does the following line  'but exclude all your organization’s standard and custom object records, documents, and attachments.' means in Developer Sandbox it is included. ?

 

Configuration-only sandbox

Configuration-only sandboxes copy all your production organization’s reports, dashboards, price books, products, apps, and customizations, but exclude all your organization’s standard and custom object records, documents, and attachments.

 

Developer sandbox

Developer sandboxes are special configuration-only sandboxes intended for coding and testing by a single developer. They provide an environment in which changes under active development can be isolated until they are ready to be shared. Just like configuration-only sandboxes, developer sandboxes copy all application and configuration information to the sandbox.

When we will click on New button under Contact tab,this meassage (Contacts not associated with accounts are private and cannot be viewed by other users or included in reports.) will be displayed at the top.

 

Please suggest that How to remove that message??.

  • November 18, 2013
  • Like
  • 0
Hi All, I wanted to retrieve Salesforce Id of a field in Apex code. Any Idea? Thanks
  • December 03, 2010
  • Like
  • 0
Hi all,

I'm having issues with mass editing from list views while using the static variable trick to control recursive triggers. I dislike this new message format so I've switched over to stackexchange. Please have a look at my full detailed question witch flow and code snippets:

http://salesforce.stackexchange.com/questions/24307 (http://salesforce.stackexchange.com/questions/24307/how-do-i-control-recursive-triggers-with-static-variables-and-permit-mass-edit-f)
  • January 16, 2014
  • Like
  • 1

Hi friends,

so again we had trouble with Jitterbit since there is no Documentation like Salesforce has.  If you are using Salesforce and you are trying to send Outbound messages be aware that they will be send in batch.

 

So in Jitterbit you have to create a Hosted Web Service, copy the URL to the Outbound Message, download the WSDL from the Outbound Message and upload it to the Hosted Web Service you created in Jitterbit.  Bit confusing but when you do it you'll get it right.

 

After the Hosted Web Service you need to create a Transformation that uses a File Format to 'save' in global variables the record.

 

In our case we needed to call a Stored Procedure (using script in jitterbit) afterwards and this is where we had the problems.  It only processed 1 record at a time even if the Outbound Message was sending more than once.

 

So the solution to this is the following:

1. Do no run the script with a 'on success' instruction of the first Operation (the Hosted Web Service).

2. Go back to the transformation where you are 'saving' in the global variables and go to the last one.

3. Run the next operation (the script that executes the SP) with this command: RunOperation("<TAG>Operations/Insert SP</TAG>", false);

 

And that one does the magic.

 

Have fun, Cheers.

  • August 29, 2013
  • Like
  • 2

As many of you have discovered, our developer community is awesome. The wealth of knowledge here is phenomenal. This is an all volunteer community and people who take the time to help and post answers do so totally on their own initiative. With that said when someone provides the right answer to your question please take the time to mark their answer as the accepted solution. Also give them a kudos if they've really gone the extra mile to help out. Show some love ;)

Recently I was working on a requirement which required overriding the Case detail page with a visualforce page. Problem crept when the related list comonent didnt worked for Case Comments and History. So I decided to write my own code to display the related lists.

I was finally able to write my own code to display the related list. It implements all the function that standard related list of Case Comments provide. In order to make it reusable, I made it as a component so that in other pages I just need to pass the Case Id and I will get the complete list of Case Comments.

 Heres the code finally :

 1. Component Code

 

<apex:component controller="CaseCommentsComponentController" allowDML="true">
<!-- Attribute Definition -->
<apex:attribute name="CaseId" description="Salesforce Id of the Case whose Case Comments needs to be rendered" type="Id" required="true" assignTo="{!caseId}" />

<!-- Component Body -->
<apex:componentBody >
<apex:form >
<apex:pageBlock title="Case Comments" >
<apex:pageBlockButtons location="top">
<apex:commandButton action="{!NewComment}" value="New"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!Comments}" var="comment">
<apex:column headerValue="Action">
<apex:outputLink value="/{!comment.cComment.Id}/e?parent_id={!caseId}&retURL=/{!caseId}">Edit</apex:outputLink>&nbsp | &nbsp
<apex:commandLink action="{!deleteComment}" value="Del">
<apex:param name="CommentId_d" value="{!comment.cComment.Id}"/>
</apex:commandLink>&nbsp | &nbsp
<apex:commandLink action="{!makePublicPrivate}" value="{!comment.PublicPrivateAction}">
<apex:param name="CommentId_p" value="{!comment.cComment.Id}" />
</apex:commandLink>
</apex:column>
<apex:column headerValue="Public" value="{!comment.cComment.IsPublished}" />
<apex:column headerValue="Comments">
<apex:outputText escape="false" value="{!comment.commentText}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:componentBody>
</apex:component>

 

 2. Apex Code

public with sharing class CaseCommentsComponentController {

public Id caseId {get; set;}
public cComments[] comments{
get{
List<cComments> comments = new List<cComments>();
for(CaseComment comment : [Select LastModifiedDate, LastModifiedBy.Id, LastModifiedBy.Name, IsPublished, CreatedDate, CreatedBy.Id, CreatedBy.Name, CommentBody From CaseComment c where ParentId = :caseId order by c.LastModifiedDate desc])
{
cComments tempcComment = new cComments();
tempcComment.cComment = comment;

// Build String to display.
tempcComment.commentText = '<b>Created By: <a href=\'/' + comment.CreatedBy.Id + '\'>' + comment.CreatedBy.Name + '</a> (' + comment.CreatedDate.format() + ') | ';
tempcComment.commentText += 'Last Modified By: <a href=\'/' + comment.LastModifiedBy.Id + '\'>' + comment.LastModifiedBy.Name + '</a> (' + comment.LastModifiedDate.format() + ')</b><br>';
tempcComment.commentText += comment.CommentBody;

if(comment.IsPublished)
tempcComment.PublicPrivateAction = 'Make Private';
else
tempcComment.PublicPrivateAction = 'Make Public';
//Add to list
comments.add(tempcComment);
}
return comments;
}

set;
}

public PageReference NewComment()
{
PageReference pr = new PageReference('/00a/e?parent_id='+ caseId + '&retURL=%2F' + caseId);
pr.setRedirect(true);
return pr;
}

public PageReference deleteComment()
{
Id commentId = ApexPages.currentPage().getParameters().get('CommentId_d');

for(cComments Comment : comments)
{
if(Comment.cComment.Id == commentId)
{
delete Comment.cComment;
break;
}
}

PageReference pg = new PageReference('/' + caseId);
pg.setRedirect(true);
return pg;
}

public PageReference makePublicPrivate()
{
Id commentId = ApexPages.currentPage().getParameters().get('CommentId_p');
for(cComments Comment : comments)
{
if(Comment.cComment.Id == commentId)
{
Comment.cComment.IsPublished = !Comment.cComment.IsPublished;
if(Comment.cComment.IsPublished)
Comment.PublicPrivateAction = 'Make Private';
else
Comment.PublicPrivateAction = 'Make Public';

update Comment.cComment;
break;
}
}
PageReference pg = new PageReference('/' + caseId);
pg.setRedirect(true);
return pg;
}

public class cComments {

public CaseComment cComment {get; set;}
public String commentText {get; set;}
public String PublicPrivateAction {get; set;}
}
}

 Hope it is helpful to you.

 Let me know your views on the code above or if you have any questions

Message Edited by Rajesh Shah on 10-16-2009 08:03 PM