• shaanRocks
  • NEWBIE
  • 24 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 16
    Replies

How to populate subject of an email dynamically with the contact fields. While sending an mass email.

 

Ex: I have a list of contacts to which i need to send an email and while sending an email how can i populate the subject dynamically with contact fields.

 

Please let me know if any soln to my requirement.

 

Thanks

shaan

Hi,

 

Need to use Merge Functionality on a list of records of the same object inorder to avoid dupliaction of records.

 

 

How to use merge functionlity here:

 

List<SObject> LIstOfRecords = new List<SObject>();

List<SObject> ListToDelete= new List<SObject>();

 

 

Here LIstOfRecords contains all the records and ListToDelete records need to be merged into LIstOfRecords.

 

When used the MERGE Statement as:

Merge LIstOfRecords ListTo Delete.

It is throwing an error:

 

I have gone through the documentation :

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_merge_statements.htm

 

Please let me know how to merge records of same object if the records are being duplicated.

 

Thanks in advance.

 

Regards,

shaan

 

 

 

How to pass values to multipicklist field type using apex code.

Here is my Requirement:

 

I have  a Value stored in string now how to pass value of a string to a multi picklist field of an object using apex code.

 

I have a value stored in a string as:

string str =

004 - Florida;008 - Ohio River;013 - Carolinas;015 - Texas;024 - Gulf Coast;024 - Gulf Coast;030 - Empire State;040 - Sun Coast;032 - Pacific Northw;029 - Rocky Mountain

 

How can i pass values form a string to multipicklist field.

I need to update a multipicklist field.

 

I have concatenated a list of values to a string as:

 

string str = '1; 2; 3; 4';

 

I thought of passing these values directly to the field but the field is not being updated.

Please let me know what needs to be done.

 

Hi,

I have a requirement in which i need to update a field on partner portal user whenever he logs in.

 

To be more clear:

I have a field in contact (say cntct1) and i need to populate the field on user object( say usr1) with the contacts field(cntct1) when ever a user log in as a partner.

 

please provide me with solution if any.

Any help is appreciated.

 

Thanks

shaan

Hi,

I have a requirement in which i need to update a field on partner portal user whenever he logs in.

 

To be more clear:

I have a field in contact (say cntct1) and i need to populate the field on user object( say usr1) with the contacts field(cntct1) when ever a user log in as a partner.

 

please provide me with solution if any.

 

Any help is appreciated.

 

Thanks

shaan

Hi,

I have a requirement in which i need to update a field on partner portal user whenever he logs in.

To be more clear:

I have a field in contact (say cntct1) and i need to populate the field on user object( say usr1) with the contacts field(cntct1) when ever a user log in as a partner.

 

please provide me with solution if any.

 

Any help is appreciated.

 

Thanks

shaan

Hi,

 

Is there any way to retrieve records more than 10000(ex: 30000) from an object in apex.

Can we make use of @future to retriev ethe records if yes whats the approach?

 

To be more clear i ahve an example:

 

List<Contact> ListCntct = [select name from contact where accountID = Account.ID];

 

Thanks in Advance

 

Shaan

 

 

I have an issue of GLimit when using the list and set.

I have written a trigger on a custom object which is in relation with contacts.

The trigger performs action based on updation or insertion of records.

Here is my code:

 

Set<String> cntctIds = new Set<String>();

List<obj__c> obj =[select id, SSN__c, Name, Status__c, Contact__c,ownerid, Account_Name__c, from obj__c where id In:trigger.newMap.keyset()];

for(Integer j=0;j< obj.size();j++)

{
        cntctIds.add(obj[j].Contact__c);
}

 

List<obj__c> obj_Total =[select id, SSN__c, Name, Status__c, Contact__c,ownerid, Account_Name__c, from obj__c where id IN: cntctIds];

 

//List used to retrieve contacts based on cntctIds

List<Contact> objCntct = [Select id,Account.Name,lookupOwnerID__c, SSN__c, PCN__c, Status__c, FirstName, LastName,AccountId, OwnerId,  from Contact where id IN: cntctIds];        

 

//List used to retrieve Obj__c based on cntctIds and Terminated Status.

List<obj__c> obj_Terminated =[select id, SSN__c, Name, Status__c, Contact__c,ownerid, Account_Name__c, from obj__c where obj__c.Status__c = 'Terminated' and id  IN: cnctctIds];

 

//List used to retrieve Obj__c based on cntctIds and Current Status.

List<obj__c> obj_Current =[select id, SSN__c, Name, Status__c, Contact__c,ownerid, Account_Name__c, from obj__c where obj__c.Status__c = 'Current' and id  IN: cnctctIds];

 

now i need to check the conditions if all the records are terminated or current.

For that i am using the condition:

for(j=0; j<objCntct ; j++)

{

if(obj_Total.size() == obj_Terminated.size())

{

//functionality

}

else if(obj_Total.size() == obj_Current.size())

{

 

}

 

}

 

This is working perfectly fine if the batch size is 1.

Becuase in that scenario there will be only one contact but if the batch size is 200 then there will be many contacts for 200 obj__c records.And then the condition fails bacause the the obj_Total count and the terminated or current count never matches.

 

Can anyone provide a soln for this.

Or any one has the idea how to make use of Maps here to check the conditions.

 

 

 

Thanks

shaan

 

 

 

Hi guyz, can anyone help me out in creating salesforce Sites.  I tried to do it but failed.

Can anyone explain me the basics involved in creating sites.I mean the steps required for building my personal website.

 

 

I tried creating sites but failed to do so.

 

Please help me out in creating Sites from salesforce.

 

Thanks in advance

shaan

How to populate subject of an email dynamically with the contact fields. While sending an mass email.

 

Ex: I have a list of contacts to which i need to send an email and while sending an email how can i populate the subject dynamically with contact fields.

 

Please let me know if any soln to my requirement.

 

Thanks

shaan

Hi,

 

Need to use Merge Functionality on a list of records of the same object inorder to avoid dupliaction of records.

 

 

How to use merge functionlity here:

 

List<SObject> LIstOfRecords = new List<SObject>();

List<SObject> ListToDelete= new List<SObject>();

 

 

Here LIstOfRecords contains all the records and ListToDelete records need to be merged into LIstOfRecords.

 

When used the MERGE Statement as:

Merge LIstOfRecords ListTo Delete.

It is throwing an error:

 

I have gone through the documentation :

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_merge_statements.htm

 

Please let me know how to merge records of same object if the records are being duplicated.

 

Thanks in advance.

 

Regards,

shaan

 

 

 

How can i pass values form a string to multipicklist field.

I need to update a multipicklist field.

 

I have concatenated a list of values to a string as:

 

string str = '1; 2; 3; 4';

 

I thought of passing these values directly to the field but the field is not being updated.

Please let me know what needs to be done.

 

Hi,

I have a requirement in which i need to update a field on partner portal user whenever he logs in.

 

To be more clear:

I have a field in contact (say cntct1) and i need to populate the field on user object( say usr1) with the contacts field(cntct1) when ever a user log in as a partner.

 

please provide me with solution if any.

 

Any help is appreciated.

 

Thanks

shaan

Hi,

I have a requirement in which i need to update a field on partner portal user whenever he logs in.

To be more clear:

I have a field in contact (say cntct1) and i need to populate the field on user object( say usr1) with the contacts field(cntct1) when ever a user log in as a partner.

 

please provide me with solution if any.

 

Any help is appreciated.

 

Thanks

shaan

I have a custom multi-select picklist that I'd like to concatenate into a string, delimited by commas.
I'd like to do this through APEX -- any quick and dirty suggestions?

 

Or at least how is the data stored?

Hi,
 
I want to create the functionality "Find Duplicate" as is avaialable in Lead for Person Accounts. The button will be on the Page layout of the Account page and will be available only for Person Accounts.
The functionaly needs to be developed in Visual Force and Apex. Can I use the apex merge call in an apex class. Will this be a better idea to create this in apex rather than as an S-Control. Has anybody tried this or has some piece of code that can get me working
 
would be grateful
Thanks