• chowdary marella
  • NEWBIE
  • -1 Points
  • Member since 2013

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

Hi all.i created 2 users(A,B), "A" as system admin and other "B" as Standard User, i created OWD setting as private for lead. so "B" cannot see Lead records.

Requirement: if suppose lead in "A" with email as "S@gmail.com"

WHEN LEAD "B" Tries to create a record with email as "S@gmail.com"(same as already existed). i need to show an popup as "LEAD ALREADY EXISTS. you want to see the lead??"aLSO i need to show the already existed lead reecord("S@gmail.com").this popup and showing the record will happen after click on save.

I think i need create a trigger that shows popup message if email already exists.next i need to create a vf page that shows the already existed record (same email is record). can any one help me how to design.?? because iam not sure how to display the record after save with existing email

How a particular record with already email record will come after click on save , but owd is private. need to show after click on save only after email matches.

 

Thanks

 

Hi i created a trigger which is working.but not working with bulkified(dataloader).please see my code,and let me know to bulkify this code

field in account object (Status_Contact) to be updated when a custom field (Project Status) on the custom Project Object gets updated.
i HAVE LOOKUP FROM PROJECT TO CONTACT(Contact__c)..

 

 

trigger contactlookup on Project__c (after insert,after update) {

list<Project__c> proj=new list<Project__c>();
Map<Id,List<Project__c>> mapProject = New Map<Id,List<Project__c>>();
set<id>ids=new set<id>();
for(Project__c p1:trigger.new)
{
ids.add(p1.Contact__c);
}

proj=[SELECT id,contact__r.Client_Status_Contact__c,contact__r.id from Project__c where Contact__c in:ids];


for(Project__c po :proj)

{
if(po.Contact__c != null)
{
List<Project__c> ProjectForKey =mapProject.get(po.Contact__c);
if(ProjectForKey == null)
{
ProjectForKey = new List<Project__c>();
mapProject.put(po.Contact__c, ProjectForKey);
}


list<contact> cont= new list<contact>();
cont=[select id ,name,Client_Status_Contact__c from contact];
contact c= new contact();
c.Client_Status_Contact__c =proj[0].contact__r.Client_Status_Contact__c;
c.id=proj[0].contact__r.id;
system.debug('##############################'+c.Client_Status_Contact__c);
for(Project__c p:trigger.new)
{
if(p.Project_Status__c!=null)
c.Client_Status_Contact__c=p.Project_Status__c;
system.debug('prrrr^^^^^^^^^^^^^^^^^^^^^^^'+p.Project_Status__c);
system.debug('accccccccc******************************************'+c.Client_Status_Contact__c);
}
Update c;
}
}
}

Hi all,  i am facing a issue, which i never faced.can any one work around it?

 

Need to send email before 1day,1hour,3hours. based on duedate__c . so i have created time based workflow  with rule criteria as Lead:duedate NOT equal to Null.

 

 

i am creating 3 dummy records to check giving before 1day,3hrs,1hr.

 

But surprise, iam getting 2 emails of 1hr,1day   to the email given in 1hour record.

 

but getting 1 email before 1 day. and 3hours which i expected..

 

 

issue :Why iam getting 2 mails for the email where i have to recieve only 1 hour template..

 


is i need to go for schedular class??
suggest me

How to stamp a date in custom field . i have created a formula field    IF(  ISPICKVAL(Confirmed__c, 'yes') , today() ,'').

 

in picklist if yes is selected, today date should populate, when no is selected it should give no value.

 

How to stamp a date in custom field . i have created a formula field    IF(  ISPICKVAL(Confirmed__c, 'yes') , today() ,'').

 

in picklist if yes is selected, today date should populate, when no is selected it should give no value.

 

Hi all i had written a class, due_date__c is date/Time field in Lead
Requirement:-I need due date reminders sent to whomever sets the due date. For example, if an agent completes a task then sets a date for the next action, a reminder needs to go to that agent to remind him/her that they have tasks to complete. Reminders should come the day before the event is due, again at 3 hours before due date and then one hour before due date.

need to schedule before 3hrs,before 1day and before 1 hour.

QUdos in Advance..Thank uu

 

 

My code

 

global class Sending_Email_SINGLECLASS implements Schedulable
{
public List<Lead> led=new List<Lead> ();
public list<lead> led1= new List<Lead> ();
public List<Lead> led2=new List<Lead> ();
list<id> leadid=new list<id>();

global void execute(SchedulableContext ctx)
{

Datetime d=system.TODAY();

 led=[select id,DUEDATETIME__c,Email from lead where DUEDATETIME__c=:date.valueOf(d.addHours(-1))];
system.debug('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'+led);
led1=[select id,DUEDATETIME__c,Email from lead where DUEDATETIME__c=:date.valueOf(d.addHours(-2))];
system.debug('@++++++++++++++++++++++++++++++++++++++'+led1); */
led2=[select id,Due_Date__c,Email from lead where Due_Date__c=:date.valueOf(d.adddays(-1))];
system.debug('@*************************************'+led2);



for(Lead l:led)
{
leadid.add(l.id);
system.debug('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'+leadid);
}


for(Lead l:led1)
{
leadid.add(l.id);
system.debug('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'+leadid);
}


for(Lead l:led2)
{
leadid.add(l.id);
system.debug('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'+leadid);
}
Messaging.MassEmailMessage mail = new Messaging.MassEmailMessage();
mail.setTargetObjectIds(leadid); // assign the all emails
//mail.setReplyTo('exemple@exemple.ex');
EmailTemplate et= [SELECT id FROM EmailTemplate WHERE developerName = 'birth_day'];
mail.setSenderDisplayName('SirdikChowdary Marella'); // displaying the senders name
mail.setTemplateId(et.id); // adding the templete id,here we are taken subject,body.
Messaging.sendEmail(new Messaging.MassEmailMessage[] { mail });
system.debug('********mail *@@@@@@@'+mail );
}
}

i have a custom field in lead and opportunity as AGE__C.and age__c field in lead is mapped to account.but now i need the same age__c field to be mapped to opportunity also...how it can be possible..how can i write a trigger for this scenario????

Hi,I am having questions__c(parent) and answers__c(child) are 2 custom objects which are having MDR relation.
Requirement:-
Need to create ONLINE EXAM on if page have 1000 records in questions__c object I need to fetch records from questions__c. Randomly to if page and need to show different questions which should not repeat.
question =60. no question should reapeat for a single participant.
Can any one make me out from this???

Thanx in advance...!!!

I have used the getshopped (for wordpress) . Actually i used wp-ecommerce for shopping and trying to use the salesforce intgration.
Could you please tell me how can do this?

HI All, 

 

 I have 20 records in My  custom object , I need to diplay  records random , no t sam e in order if  I refresh the page How can i solve  this solution

 

Hi,

 

In contracts I have a custom field No of Visits. Based on this and contract period (in months) I will have to update a date field - next visit. So Next_Visit_Date__c will be ContractTerm/No_of_Visits__c months ahead of start date (for the first time). Once this date is over, I need to override the same field, this time Next_Visit_Date__c will be ContractTerm/No_of_Visits__c months ahead of previous Next_Visit_Date__c. I have created WFR on creation to fill the next visit date for the first time also have created time based workflow rule which creates a task to notify, as well as update the Next_Visit_date__c. Everything works fine!!

 

But the time based workflow doesn't fire again. I cannot use ISCHANGED() or PRIORVALUE() functions in Evaluation Criteria : When a record is created, or when a record is edited and did not previously meet the rule criteria.

 

I am thinking of creating a custom date field which will store the previous value of Next_Visit_Date__c and use that in the Rule criteria of time based workflow. Is there any better suggestion?

Please let me know.

Hi ,

 

I was wondering if we can create a Quiz using SFDC and assess the results as well. Any ideas on how to go about it would certainly be of great help.

 

Thanks,

Sales4ce

I am trying to develop an online exam.

 

I was successful in keeping all the questions and writing class for them.

It works fine, but I need some questions which should be randomly picked from object.

Every time these questions should be different.

How can we achieve randomly ques from db?

 

Help me out at earliest.