• V'Nath
  • NEWBIE
  • 35 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 17
    Questions
  • 17
    Replies

Hi Every one,

 

I have one requirment, I have to create one custom formula filed  in account object ie. "Photo__c" (i dont know how to create it ) and I have to upload an image using visualforce page and save this image to "Photo__c" field. while i have to show this image in visualforce page again.

 

How to achieve this functionality, Please help me out of this...

 

Thanks in adv........

 

  • September 15, 2011
  • Like
  • 1
How to generate topic and followers objects , i wanted to have each topic name and followers of that topic in a spread sheet?

Can we generate report and export to excel?

What is the difference between topic assignment and topic following , what objects refers these things in SFDC.
  • March 03, 2015
  • Like
  • 0
Hi Folks,

I got one of the requirement for my client , I have to congigure live agent for my customer website and by default it will support for english language but where I have to provide language translation for the end user based on his brower (it may chinese,spanish etc..)

But I should have to use third party API to translate language to show their own language on the chat window to the enduser while chatting with salesforce Agent.

For the language Translation : I have some API which will do translation and give it to me .

Thanks,
JV
  • October 10, 2014
  • Like
  • 0
Hi 

I just done logic to identify duplicates leads based on email address and if any duplicate record is find then adding object .add error and avoiding duplicate record creation into database.
but user is going to upload bulk records so what ever i found duplicates i have to place those records into Custom object so when i use this adderror in trigger it is not allowing to create records. and with in the debug log it showing some records insertion successfully.

how to use adderror and duplicates i have to place into custom object.

trigger LeadDupeCheckTrigger on Lead (before insert, before update) {
for(Lead l:trigger.new){
  if(l.email =='test@sfdc.com'){
     l.addError('this is duplicate lead ');
   // Trying to place into custom object
Duplicate_Leads__c Dl = new Duplicate_Leads__c();
      Dl.First_Name__c = newLead.firstname;
      Dl.Last_Name__c = newLead.lastname;
      Dl.Company__c = newLead.company;
      Dl.Email__c = newLead.email;   
      lstDLeads.add(Dl);
     lstem.add(newLead.email);    

   }
}
// finally inserting into custom object

if(!lstDLeads.isEmpty())
     insert lstDLeads;

}
  • August 11, 2014
  • Like
  • 0
I have configured Email-to-Case functionality to my sandbox and for routing address customers will send emails with their queries, while sending emails they may include some screenshots .

Sample Email Content: 


Hi this is google image and below image screen shot

 User-added image

What Salesforce functionality happen here is by defualt email text will be populated to description field and screen shot will get stored into attachments. and under case object we do have Emails related list where we can see original email content which customer has sent.

But the problem is my customer wants to see original content which customers has sent with in the description field .

So I have created one custom description field and datatype is Rich text area. 

Customization i have done : 

Created workflow rule on EmailMessage Object and tried to populate EmailMessage object HtmlBody field into Case object description (Custome field ) .
text is populated but images are not able to see and some empty textboxes i can see like below.
User-added image


So above solution is not working and again i have done some tirgger on EmailMessage object to update htmlbody into desc field

like below : 

first i put event after insert only but still its doesnt work for me so again i put all the events but no luck.

trigger UpdateDescTrigger on EmailMessage (after insert,after update,before insert ,before update) {
    //set<id> CaseIds = new set<Id>();
    map<Id,EmailMessage> MapEmailMessage = new map<Id,EmailMessage>();
    for(EmailMessage e:trigger.new){
        MapEmailMessage.put(e.ParentId,e);
    }
   
    list<Case> lstC = [select Id,Description__c from Case where id in:MapEmailMessage.keyset()];
    for(Case c:lstC){
        if(MapEmailMessage != null && MapEmailMessage.get(c.Id) != null )
            c.Description__c = MapEmailMessage.get(c.Id).HtmlBody;
    }
    update lstC;
   
}


My question is : i want to automatically update HTMLBody of EmailMessage into Case Description__c (Custom field)

But if i edit case record manually  and saved its working for me when i have done below trigger.


trigger updateCasse on Case (before update) {
    set<Id> parentIds = new set<Id>();
    map<Id,EmailMessage> mapEmailMessage = new map<Id,EmailMessage>();
    for(Case c:trigger.new){   
        parentIds.add(c.Id);
    }   
    list<EmailMessage> lste = [select id,HtmlBody,parentId from EmailMessage where parentid in:parentIds and Incoming = true];
   
    if(lste.size() > 0 ){
     for(EmailMessage e:lste){
         mapEmailMessage.put(e.parentId,e);
     }
     list<Case> lstC = new list<Case>();
     for(Case c:trigger.new){ 
      if(mapEmailMessage != null && mapEmailMessage.get(c.Id) != null)   
          c.description__c = mapEmailMessage.get(c.Id).HtmlBody;       
     }
    }
}

Plz help me.





there is a field description on Case Object and configured email to case for my org so whenever customer sends email to Routing address they may be include images and links but i have to open up links and need to display in case detail page instead of showing as links.

suppose some customer may send email like this 

Hi 

Please deliver my order and he will mention here some order number  and below he will attach some screen shots and then he will place some links 

ex:https://google.com

but i have to show here text and google home page.





Hi ,

 

Can any once face this problem when we executin some code using developer console the log will not open.

 

Any one face this problem.

 

Thank you

  • November 15, 2013
  • Like
  • 0

Hi ,

 

I have done one test method for my Trigger . Myunittest method is success with out returning errors I observed this under Tests tab in developer console. but it showing Failed symbol for my testclass .

 

Tests [tab] from developer console

 

Failed symbol : Here mytest Class Name  

but here if i open my test method it showing success symbol. 

 

 

 

Can any one help me on this.

 

  • November 14, 2013
  • Like
  • 0

Hi ,

 

I need to run local drive (system) Video files in vf page.

 

I approached like the below .

 

my file location isfile:///D://Videos/movie.ogg

 

<apex:page >
<html>
<body>
<video width="320" height="240" controls="Controls" >
<source src="file:///D://Videos/movie.ogg" type="video/ogg" />
</video>
</body>
</html>
</apex:page>

 

thanks in advance.

 

 

 

  • November 12, 2013
  • Like
  • 0

on Which object we can write trigger ( Can we write Trigger on Document )

 

How to check on which objects we can write trigger  (any link )

 

 

Regards,

SFDC Dev

Stragne:mansad:

 

any thing wrong in my code

 

list<Account> accts = new list<Account>{new Account(name='test account')};

or


Account[] newaccts =new Account[]{new Account(name='dev account')};

  • April 13, 2012
  • Like
  • 0

Hi ,

 

i have purchased Group Editon intially , now i have upgraded to professional Editon  but still its not giving option to Rename objects and Fields  .  any help regards this ?.

 

"Actually Professional Edition Supports to Rename Objects and Fields ."

 

Thanks,

VN .

 

 

 

  • April 02, 2012
  • Like
  • 0

i would like to design custom VF page for Send email , and my custom vf page should be looks like standard send email, so which Standard object i need to  use to get the CC, BCC fields.

if i use Standardcontroller then i am able to design Same as Send email.

 

Please any one help ,  where i can get the CC,BCC fields.

 

 

  • March 17, 2012
  • Like
  • 0

how to place query in Homepage Component  . i have writeen Script like below in that i would like to get User information

by using Query or Global Variables but it Doesnt give Result.

please help regards this issue. Advance thaks . 

<script>
var caseviewid;
casviewnone();
function casviewnone(){
caseviewid = document.getElementById('00BU0000002QFJR_filterLinks');
alert('{!$user.firstname}');
var lst = document.getElementsByTagName('a');
for(var i=0; i<lst.length;i++){
if(lst[i].innerHTML == 'Edit' || lst[i].innerHTML == 'Create New View' || lst[i].innerHTML == ' | ' ){
lst[i].style.display = 'none';
}
}
if(caseviewid == null){
setTimeout("casviewnone()", 200);
alert('if');
}else{
document.getElementById('00BU0000002QFJR_filterLinks').style.display='none';
}
}
</script>

 

  • March 09, 2012
  • Like
  • 0

hi,

 

The below query retunrs the error system.query Exception but its working in System log  . please any help regards this issue.

 

 

Pricebook2 pbook = [select id from Pricebook2 where IsStandard = true limit 1]; 

 

 

Regards,

V'nath

 

 

  • March 07, 2012
  • Like
  • 0

Hi All,

 

Can we add Chatter External user into Groupmember

 

 

CollaborationGroupMember cgm = new CollaborationGroupMember(                                                memberId ='Userid' ,                                                collaborationgroupId = 'Groupid'  //Listening Sessions Group                                                                                          );insert cgm;

 

 

i got the following Error, but this code works for Remaining users 

Error: invalid Cross Reference 

 

  • October 28, 2011
  • Like
  • 1

Hi all,

 

How to add Chatter External user into Chatter Group member , Please help me Regards this . 

 

 

Regards,

V'Nath

 

 

  • October 28, 2011
  • Like
  • 1

Hello Everyone,

 

I need to Implement Autocomplete for Picklist. please help me if anyone worked on it.

 

Regrads,

  • October 27, 2011
  • Like
  • 0

Hi All,

 

Can we add Chatter External user into Groupmember

 

 

CollaborationGroupMember cgm = new CollaborationGroupMember(                                                memberId ='Userid' ,                                                collaborationgroupId = 'Groupid'  //Listening Sessions Group                                                                                          );insert cgm;

 

 

i got the following Error, but this code works for Remaining users 

Error: invalid Cross Reference 

 

  • October 28, 2011
  • Like
  • 1

Hi all,

 

How to add Chatter External user into Chatter Group member , Please help me Regards this . 

 

 

Regards,

V'Nath

 

 

  • October 28, 2011
  • Like
  • 1
How to generate topic and followers objects , i wanted to have each topic name and followers of that topic in a spread sheet?

Can we generate report and export to excel?

What is the difference between topic assignment and topic following , what objects refers these things in SFDC.
  • March 03, 2015
  • Like
  • 0
I have configured Email-to-Case functionality to my sandbox and for routing address customers will send emails with their queries, while sending emails they may include some screenshots .

Sample Email Content: 


Hi this is google image and below image screen shot

 User-added image

What Salesforce functionality happen here is by defualt email text will be populated to description field and screen shot will get stored into attachments. and under case object we do have Emails related list where we can see original email content which customer has sent.

But the problem is my customer wants to see original content which customers has sent with in the description field .

So I have created one custom description field and datatype is Rich text area. 

Customization i have done : 

Created workflow rule on EmailMessage Object and tried to populate EmailMessage object HtmlBody field into Case object description (Custome field ) .
text is populated but images are not able to see and some empty textboxes i can see like below.
User-added image


So above solution is not working and again i have done some tirgger on EmailMessage object to update htmlbody into desc field

like below : 

first i put event after insert only but still its doesnt work for me so again i put all the events but no luck.

trigger UpdateDescTrigger on EmailMessage (after insert,after update,before insert ,before update) {
    //set<id> CaseIds = new set<Id>();
    map<Id,EmailMessage> MapEmailMessage = new map<Id,EmailMessage>();
    for(EmailMessage e:trigger.new){
        MapEmailMessage.put(e.ParentId,e);
    }
   
    list<Case> lstC = [select Id,Description__c from Case where id in:MapEmailMessage.keyset()];
    for(Case c:lstC){
        if(MapEmailMessage != null && MapEmailMessage.get(c.Id) != null )
            c.Description__c = MapEmailMessage.get(c.Id).HtmlBody;
    }
    update lstC;
   
}


My question is : i want to automatically update HTMLBody of EmailMessage into Case Description__c (Custom field)

But if i edit case record manually  and saved its working for me when i have done below trigger.


trigger updateCasse on Case (before update) {
    set<Id> parentIds = new set<Id>();
    map<Id,EmailMessage> mapEmailMessage = new map<Id,EmailMessage>();
    for(Case c:trigger.new){   
        parentIds.add(c.Id);
    }   
    list<EmailMessage> lste = [select id,HtmlBody,parentId from EmailMessage where parentid in:parentIds and Incoming = true];
   
    if(lste.size() > 0 ){
     for(EmailMessage e:lste){
         mapEmailMessage.put(e.parentId,e);
     }
     list<Case> lstC = new list<Case>();
     for(Case c:trigger.new){ 
      if(mapEmailMessage != null && mapEmailMessage.get(c.Id) != null)   
          c.description__c = mapEmailMessage.get(c.Id).HtmlBody;       
     }
    }
}

Plz help me.





Hi ,

 

Can any once face this problem when we executin some code using developer console the log will not open.

 

Any one face this problem.

 

Thank you

  • November 15, 2013
  • Like
  • 0

Hi ,

 

I need to run local drive (system) Video files in vf page.

 

I approached like the below .

 

my file location isfile:///D://Videos/movie.ogg

 

<apex:page >
<html>
<body>
<video width="320" height="240" controls="Controls" >
<source src="file:///D://Videos/movie.ogg" type="video/ogg" />
</video>
</body>
</html>
</apex:page>

 

thanks in advance.

 

 

 

  • November 12, 2013
  • Like
  • 0

Hi

 

I used below css to get the landscape page and it is renderedAs PDF.

 

<head>
<style>
@page{
size:landscape;
}
</style>
</head>

 

The same code worked fine long ago. Now its not working.

 

Can you let me know, what reasons may cause this?

 

 

I am trying to use a custom font (for info, Garamond) in a Visualforce page. Following some research, I have found that it might be possible to upload the font file as a static resource, and refer to it in the page.

 

However, I don't seem to be able to find much about the detail of how this works. So:

 

  • Firstly, is this possible?
  • If so, in what format do I need to upload the font file? TTF? Zipped TTF? Other Font file?
  • Lastly, how do I reference the font in the Visualforce page? In other words, what would I put in the blank:
body {
font-family: _________;
}

 

Thanks for any help.

 

i would like to design custom VF page for Send email , and my custom vf page should be looks like standard send email, so which Standard object i need to  use to get the CC, BCC fields.

if i use Standardcontroller then i am able to design Same as Send email.

 

Please any one help ,  where i can get the CC,BCC fields.

 

 

  • March 17, 2012
  • Like
  • 0

I have an opportunity, ExOp that I receive through a query.

 

Opportunity ExOp = [SELECT name from opportunity

                                    WHERE (AccountId = :o.AccountId and ForecastCategoryName !='Closed')

                                    ORDER BY CloseDate ASC NULLS last LIMIT 1];

 

I am trying to access the list of product in it. (is it OpportunityLineItem?)

Specifically, I want to get to the 'Product2' and 'quantity' fields.



Can someone suggest code to access it?

 

Hi all,

     I want to display standard reports in vf page.any one can u please give me the sample code.

 

Thanks in advance..

anu

     

  • September 16, 2011
  • Like
  • 0

Hi Every one,

 

I have one requirment, I have to create one custom formula filed  in account object ie. "Photo__c" (i dont know how to create it ) and I have to upload an image using visualforce page and save this image to "Photo__c" field. while i have to show this image in visualforce page again.

 

How to achieve this functionality, Please help me out of this...

 

Thanks in adv........

 

  • September 15, 2011
  • Like
  • 1

Hi,

 

I have created a trigger on the CampaignMember object as below:

 

trigger CampaignMemberUpdate on CampaignMember (after insert, after update) {
    for (CampaignMember cm : trigger.new){
        Contact contact = [SELECT Id from Contact where id = :cm.ContactId];
        contact.Campaign_Member_Update_Date__c = cm.LastModifiedDate;
        upsert contact;
    }
}

 

This trigger works well and updates the Campaign_Member_Update_Date__c field as expected.

 

I am now writing the test method for the trigger and have created the following:

 

@isTest
private class CampaignMemberUpdateTest{
        static testMethod void CampaignMemberUpdateTest() {
            
            //Set up the Contact record.
            Contact c = new Contact(Firstname='Test',LastName='Test');
            insert c;
            
            //Set up the Campaign record.
            Campaign cg = new Campaign(Name='Test');
            insert cg;
            
            //Set up the CampaignMember record.
            CampaignMember cm = new CampaignMember(CampaignId=cg.id,ContactId=c.id);
            
            //Cause the Trigger to execute.
            insert cm;
            
            //Verify that the results are as expected.
            c = [select Id,Campaign_Member_Update_Date__c from contact where id = :cm.ContactId];
            System.assertEquals(cm.LastModifiedDate,c.Campaign_Member_Update_Date__c);
            }
        }

 

However, when i run this test I get an error at the 'System.assertEquals' line with the following message:

 

System.AssertException: Assertion Failed: Expected: null, Actual: 2011-09-08 12:30:31

 

I then tried to set a 'cm.LastModifiedDate' value when creating the CampaignMember record, however I am unable to save the test method as the 'cm.LastModifiedDate' field is not writeable.

 

Does anyone know how I can fix this please?

 

Thanks,

 

Marco 

I did run all tests then I got the folllowing error message & I did RND on it also but I did not get any response from it so please let me know abt it as soon as possible.

Error as :-

line -1, column -1: Previous load of class failed: lifecycle

 

Please reply me urgently why this error is coming ?

 

On the Contact new / edit screen, when you lookup an Account, the Address firelds from the Account are filled into the Contact address fields on the screen.

 

I've now added a custom field to Account and Contact objects called "Building Name" - does anyone know of a way to get the new field to auto-populate on the Contact screen as well ?

Anyone done something similar?

 

 

Thanks.

Hi all,

 

I have a problem about upload file using apex:InputFile control, when i add this control (apex:InputFile) to form that uses renderer attribute, there is an error occurs:

apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute

 

Pls help me to solve this problem. 

I'd like to re-open the discussion of SortOrder on the OpportunityLineItem object. A thread from 3.5 years ago can be located here:
http://community.salesforce.com/sforce/board/message?board.id=general_development&message.id=3154

Looks like people from SF were going to look into it but obviously nothing has come to fruition. The reason I have put this in the Visualforce board is that we have have a few VF applications that could really take advantage of access to this field. Visualforce has also opened up new possibilities to UI design where the ability to manage SortOrder could be useful.

Also, no offense to salesforce.com, but the tool for sorting OpportunityLineItems is not that useful when there are multiple products with the same name. I have actually built a pretty slick sorting application but this is currently useless.

A lot of the concerns were about error handling. What happens if you have 3 line items but sort order is defined as, 1, 2, 2. Or 1, 2, 4. How about just throwing a sortOrder exception and force the developers to write good code?

Ideas? Thoughts?
http://ideas.salesforce.com/article/show/10092062/OpportunityLineItem_SortOrder_to_be_CreatableUpdatable

-Jason


Message Edited by TehNrd on 09-05-2008 01:22 PM
  • September 03, 2008
  • Like
  • 1

Hi there,

i'm implementing Salesforce2Salesforce for a customer. I'm using triggers on the receiving org to create the correct relationships (eg. when sending a single opportunity)

I managed to get this working, however it would have been much easier if i could enable debugging for the "Connection user" (the user that performs the actions on behalf of the shared connection) This is not possible using the normal monitoring.

 

Anyone have a good workaround?