• harry63
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 11
    Replies

Hello All

i had a question regarding Role,Profiles,public groups. we had different user groups. Each User group has access to all Data/Records in salesforce.But for one user group(10 people), they want to see Data/Records created by that user group(10 people), they dont want to access any other data/records which are not created by their user group(10 people).

 

Note:They can able to access the  records created by the users with in their group. It means user should able to access their own records and the records created by the other users in their particular group.

Please help me urgent..need sollution to get start of the project.

Thanks in Advance

Harry

Hello All

i had a question regarding Role,Profiles,public groups. we had different user groups. Each User group has access to all Data/Records in salesforce.But for one user group(10 people), they want to see Data/Records created by that user group(10 people), they dont want to access any other data/records which are not created by their user group(10 people).

 

Note:They can able to access the  records created by the users with in their group. It means user should able to access their own records and the records created by the other users in their particular group.

Please help me urgent..need sollution to get start of the project.

Thanks in Advance

Harry

 

Hello All

I had a question regarding Role,Profiles,public groups. we had different user groups. Each User group has access to all Data/Records in salesforce.But for one user group(10 people), they want to see Data/Records created by that user group(10 people), they dont want to access any other data/records which are not created by their user group(10 people).

 

Note:They can able to access the  records created by the users with in their group. It means user should able to access their own records and the records created by the other users in their particular group.

Please help me urgent..need sollution to get start of the project.

Thanks in Advance

Harry

I had a question regarding Role,Profiles,public groups. we had different user groups. Each User group has access to all Data/Records in salesforce.But for one user group(10 people), they want to see Data/Records created by that user group(10 people), they dont want to access any other data/records which are not created by their user group(10 people).

 

Note:They can able to access the  records created by the users with in their group. It means user should able to access their own records and the records created by the other users in their particular group.

Please help me urgent..need sollution to get start of the project.

Thanks in Advance

Harry

HI i have some selected contacts inone list and i have some selected contacts in other list.i want to display the selected contacts on a vf page. does any one tell me how to combine selected records in both lists.

It is very urgent

thanks in advance

  • September 03, 2010
  • Like
  • 0

hI i had an asynchronous class contains two methods.so i used to @future calls for those. i am posting my trigger code and asynchronous class.could you please help me.

Thanks in Advance

trigger code

trigger open120 on Opportunity (before insert, after update) 
{

 if(trigger.isinsert){
list<String> OpportunityAccountIds = new list<String>(); 
for(opportunity opp:trigger.new)
{OpportunityAccountIds.add(opp.Accountid);}
opp120.opp120Method(OpportunityAccountIds);}

else{
list<String> OpportunityAccountIds = new list<String>(); 
list<String> OpportunityOldAccountIds = new list<String>(); 
for(opportunity opp:trigger.new)
{OpportunityAccountIds.add(opp.Accountid);}
for(opportunity opp:trigger.old)
{OpportunityOldAccountIds.add(opp.Accountid);}

opp120.opp120Method(OpportunityAccountIds);  //getting error too many future calls:11 at this line
opp120.opp120OldMethod(OpportunityOldAccountIds);}


}

 

 

asynchronous class

public class opp120{
@future(callout=true) 
public static void opp120Method(list<String> OpportunityAccountIds){ 
list<Opportunity>lstOpp =[select Id, StageName,Expiry_Date__c from Opportunity where AccountId IN :OpportunityAccountIds];  

for(Account ac:[select id,No_of_Open_Deals_in_Next_120_Days__c from Account where id in :OpportunityAccountIds])
{
integer i=0;
 for(Integer j = 0; j < lstOpp.size(); j++)  {
if((lstopp[j].StageName=='Prospecting'||lstopp[j].StageName=='Renewal'||lstopp[j].StageName=='Submission')&&(lstopp[j].Expiry_Date__c>=System.today()+120))
{
i++;
}
ac.No_of_Open_Deals_in_Next_120_Days__c=i;
}update ac;
}
}
@future(callout=true)
public static void opp120OldMethod(list<String> OpportunityOldAccountIds){ 
list<Opportunity>lstOpp = [select Id, StageName,Expiry_Date__c from Opportunity where AccountId IN :OpportunityOldAccountIds];  

for(Account ac:[select id,No_of_Open_Deals_in_Next_120_Days__c from Account where id in :OpportunityOldAccountIds])
{
integer i=0;
 for(Integer j = 0; j < lstOpp.size(); j++)  {
if((lstopp[j].StageName=='Prospecting'||lstopp[j].StageName=='Renewal'||lstopp[j].StageName=='Submission'||lstopp[j].StageName=='ClosedLost'||lstopp[j].StageName=='ClosedWon')&&(lstopp[j].Expiry_Date__c>=System.today()+120))
{
i++;
}
ac.No_of_Open_Deals_in_Next_120_Days__c=i;

}update ac;
}
}

}

 

 

Hi
i have a question that "Is it possible to populate a custom field on Accounts object that shows the number of opportunities open for next 120 days?"
I tried for rollup summaries but the filter criteria is not accepting the function today()+120.it is only taking standard date format.

THANKS IN ADVANCE

Hi all
i have a question that "Is it possible to populate a custom field on Accounts object that shows the number of opportunities open for next 120 days?"
I tried for rollup summaries but the filter criteria is not accepting the function today()+120.it is only taking standard date format.

 

thanks in advance

hi all

i am trying to write dedupliaction trigger on account based on account name and billingcity.can anyone give trigger code. issue:if any user try to enter same account name and city it should generate an error.

thanks in advance

hello every one can anyone explain  and define   trigger.old and trigger.oldmap in detail.because i didnt find anywhere

thanks

harry

Hi members.. i have a question about developing apex code in salesforce. i am a fresher completed my masters in management. i trained in salesforcce as admin and developer. but i am worrying about developing apex code for a real time project.could you please tell me what percent of code is written by developers as own and what percent of code will be available from the sources like forums, google, importing the existindg code...... etc.

 

waiting for the responses from all

 

THANKS IN ADVANCE

HARRY

HI i have some selected contacts inone list and i have some selected contacts in other list.i want to display the selected contacts on a vf page. does any one tell me how to combine selected records in both lists.

It is very urgent

thanks in advance

  • September 03, 2010
  • Like
  • 0

hI i had an asynchronous class contains two methods.so i used to @future calls for those. i am posting my trigger code and asynchronous class.could you please help me.

Thanks in Advance

trigger code

trigger open120 on Opportunity (before insert, after update) 
{

 if(trigger.isinsert){
list<String> OpportunityAccountIds = new list<String>(); 
for(opportunity opp:trigger.new)
{OpportunityAccountIds.add(opp.Accountid);}
opp120.opp120Method(OpportunityAccountIds);}

else{
list<String> OpportunityAccountIds = new list<String>(); 
list<String> OpportunityOldAccountIds = new list<String>(); 
for(opportunity opp:trigger.new)
{OpportunityAccountIds.add(opp.Accountid);}
for(opportunity opp:trigger.old)
{OpportunityOldAccountIds.add(opp.Accountid);}

opp120.opp120Method(OpportunityAccountIds);  //getting error too many future calls:11 at this line
opp120.opp120OldMethod(OpportunityOldAccountIds);}


}

 

 

asynchronous class

public class opp120{
@future(callout=true) 
public static void opp120Method(list<String> OpportunityAccountIds){ 
list<Opportunity>lstOpp =[select Id, StageName,Expiry_Date__c from Opportunity where AccountId IN :OpportunityAccountIds];  

for(Account ac:[select id,No_of_Open_Deals_in_Next_120_Days__c from Account where id in :OpportunityAccountIds])
{
integer i=0;
 for(Integer j = 0; j < lstOpp.size(); j++)  {
if((lstopp[j].StageName=='Prospecting'||lstopp[j].StageName=='Renewal'||lstopp[j].StageName=='Submission')&&(lstopp[j].Expiry_Date__c>=System.today()+120))
{
i++;
}
ac.No_of_Open_Deals_in_Next_120_Days__c=i;
}update ac;
}
}
@future(callout=true)
public static void opp120OldMethod(list<String> OpportunityOldAccountIds){ 
list<Opportunity>lstOpp = [select Id, StageName,Expiry_Date__c from Opportunity where AccountId IN :OpportunityOldAccountIds];  

for(Account ac:[select id,No_of_Open_Deals_in_Next_120_Days__c from Account where id in :OpportunityOldAccountIds])
{
integer i=0;
 for(Integer j = 0; j < lstOpp.size(); j++)  {
if((lstopp[j].StageName=='Prospecting'||lstopp[j].StageName=='Renewal'||lstopp[j].StageName=='Submission'||lstopp[j].StageName=='ClosedLost'||lstopp[j].StageName=='ClosedWon')&&(lstopp[j].Expiry_Date__c>=System.today()+120))
{
i++;
}
ac.No_of_Open_Deals_in_Next_120_Days__c=i;

}update ac;
}
}

}

 

 

Hi,

When I execute anonymous the following ..

 

 

class A {
 class B {
 }
}

 .. it does not compile but fails with message 

 

Compile error at line 2 column 0
unexpected token: 'class'

 

Compile error at line 2 column 0unexpected token: 'class'

 

The same design pattern works in a controller class.

 

Any explanations?

 

TIA

 

Hi all
i have a question that "Is it possible to populate a custom field on Accounts object that shows the number of opportunities open for next 120 days?"
I tried for rollup summaries but the filter criteria is not accepting the function today()+120.it is only taking standard date format.

 

thanks in advance

hi all

i am trying to write dedupliaction trigger on account based on account name and billingcity.can anyone give trigger code. issue:if any user try to enter same account name and city it should generate an error.

thanks in advance

This is my first APEX coding... and, I need a bit of help. 

 

I am trying to count the # of related records...

 

I'd then, like to make a field on the current record equal to this count.

 

The following seems to work well... except I don't know how to limit the select statement to where the related_id = the id of the current record.  How do I make the variable "sid" = the id on the current record on the object Students?  Also, do I need a "loop" -- if so, how would this look?

 

Many thanks!

 

trigger CountRelatedCallLogs on Student__c (before insert, before update) { Student__c[] s = Trigger.new; String sid = null; Sid = s.id; LIST <Student_Call_Log__c> log = [SELECT Id, Related_Student__c, Date__c, Note__c FROM Student_Call_Log__c clog WHERE Student_Call_Log__c.Related_Student__c = :sid ORDER BY Related_Student__c, Id DESC LIMIT 1000]; s[0].Call_Count__c = log.size (); s[0].Most_Recent_Call_Note__c = sid(); }

 

 

  • January 19, 2010
  • Like
  • 0

Hi,

 

I was wondering if anyone has had any joy with opening a popup window in salesforce using javascript which they can then communicate with (ie. call javascript functions on the popup from the main window)? At the moment I have a custom link that opens the popup window (a VF page) but then it cannot reference javascript functions on the popup. I think this is because the javascript on the custom link is embedded in the page weirdly...is there another way on the homepage of declaring some javascript in a neat way?

 

Thank you for your help.

Illegal assignment from a Contact List to a contact list.....hmmmmm. Seems the compiler is having issues with case sensitivity.

This only happens in Summer08. Here is the code to reproduce:

Code:
List<Contact> cons = new List<Contact>();
cons = [select Id, Name from Contact limit 10];