• Sathish balaji
  • NEWBIE
  • 50 Points
  • Member since 2015

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 16
    Replies
Hello Developers!

I have a situation here in which trigger is not firing.
Master object: Volunteer_Project__c and Detail object: Participation__c
I want to count number of unique email addresses (Total_Associated_Volunteers__c) of Participation__c on Volunteer_Project__c.

Approach: Whenever there is a record entry in child for one particular master, I am compering that newly inserting record's email address to all of the child records of that master. If similar email found then Unique_Roll_Up__c on that detail record is 0 otherwise 1. At the end, I am putting rollup summary on Unique_Roll_Up__c at the Master object.

Trigger:
 
Trigger UniqueRollUp On Participation__c(Before Insert, Before Update){

    List<Participation__c> Partici = New List<Participation__c>();
    Set<String> UniqueEmailSet = New Set<String>();
    Set<ID> ProjIds = New Set<ID>();
    
    If(Trigger.IsInsert || Trigger.IsUpdate)
    {
        For(Participation__c P: Trigger.New)
        {    
            ProjIds.add(P.Volunteer_Project_Name__c);    
        }
    }
    
    Partici = [Select Volunteer_Email__c FROM Participation__c WHERE Volunteer_Project_Name__c = :ProjIds];
    
    For(Participation__c Pa: Trigger.New){
        If(Pa.Volunteer_Email__c != null){
            
            for(Integer I = 0; I<Partici.size(); I++){
                if(Pa.Volunteer_Email__c == Partici[0].Volunteer_Email__c){
                    Pa.Unique_Roll_Up__c = 0;
                }
            }
        }
        else{
            Pa.Unique_Roll_Up__c = 1;
        }
    }
}

Thank You!
Hi there:

I am really new to this big Salesforce world. One of the requirement for us is to create Salesforce entites remotely from our WordPress site. The only way I can think of right now is to use JavaScript.

Can anyone please tell me how to do it using REST API? I found some documentation on https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit. However I am not sure how to approach here. What values do I need to supply for var clientId , var redirectUri and var proxyUrl? Is there any other way?

Any help will be much appreciated.

Thanks
Anindya
Hey,
I am trying to run SOQL query on contact object through Javascript and getting all the updateble fields. But when i try to run the query, the sForce object throws an error that INVALID_FIELD: ↵OtherCountry,OtherLatitude,OtherLongitude,OtherGeocodeAccuracy,MailingStreet↵.
When i run the same query in the query editor, it runs fine and returns all the fields. But it throws error when run through javascript. There is no error in Javascript as i have removed these fields and the query worked fine.  
HI ,
How to reduce the permissions for two users at a time ? Below is my requirement:
I have five users , now i want reduce the access to TWO users..if it's possible.pls explain this.

Thanks,
Viswa
Hello Developers!

I have a situation here in which trigger is not firing.
Master object: Volunteer_Project__c and Detail object: Participation__c
I want to count number of unique email addresses (Total_Associated_Volunteers__c) of Participation__c on Volunteer_Project__c.

Approach: Whenever there is a record entry in child for one particular master, I am compering that newly inserting record's email address to all of the child records of that master. If similar email found then Unique_Roll_Up__c on that detail record is 0 otherwise 1. At the end, I am putting rollup summary on Unique_Roll_Up__c at the Master object.

Trigger:
 
Trigger UniqueRollUp On Participation__c(Before Insert, Before Update){

    List<Participation__c> Partici = New List<Participation__c>();
    Set<String> UniqueEmailSet = New Set<String>();
    Set<ID> ProjIds = New Set<ID>();
    
    If(Trigger.IsInsert || Trigger.IsUpdate)
    {
        For(Participation__c P: Trigger.New)
        {    
            ProjIds.add(P.Volunteer_Project_Name__c);    
        }
    }
    
    Partici = [Select Volunteer_Email__c FROM Participation__c WHERE Volunteer_Project_Name__c = :ProjIds];
    
    For(Participation__c Pa: Trigger.New){
        If(Pa.Volunteer_Email__c != null){
            
            for(Integer I = 0; I<Partici.size(); I++){
                if(Pa.Volunteer_Email__c == Partici[0].Volunteer_Email__c){
                    Pa.Unique_Roll_Up__c = 0;
                }
            }
        }
        else{
            Pa.Unique_Roll_Up__c = 1;
        }
    }
}

Thank You!

Hey everyone,

I'm trying to build a page that will need to be able to bring in a field from a class that isn't directly related to the class I'm attempting to ultimately edit. The scenario is I am trying to check out a book in the library and need to create an instance of "CheckOut" which is a child to both LibraryCustomer and Book. However, on the page the user should first choose the library from a dropdown, then the LibrarySection from a dropdown (that is updated dynamically by what Library is chosen), then the Book they want to check out and their LibraryCustomer ID. Upon doing this and clicking a button called "Check Out", it will create an instance of "CheckOut" with the "LibraryCustomer ID" and "Book ID". The picture is of the schema I created.

User-added image

 

Thank you!!

I have 3 incident types like A,B,C. Incident type A only having incident description field. And incident type B and incident type C having no incident description field. So if i choose incident type A then incident description div tag it should be display in pdf page. If i choose incident type B or incident type C then incident description div tag it shouldn't be display in pdf page(hide that div tag).
Hi there:

I am really new to this big Salesforce world. One of the requirement for us is to create Salesforce entites remotely from our WordPress site. The only way I can think of right now is to use JavaScript.

Can anyone please tell me how to do it using REST API? I found some documentation on https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit. However I am not sure how to approach here. What values do I need to supply for var clientId , var redirectUri and var proxyUrl? Is there any other way?

Any help will be much appreciated.

Thanks
Anindya
Hello all,

I'm working for an NFP organisation whe want to see two tabs for the two account record types. They are using classic so I figured I'd just do two VF tabs. However , using both id and listId provides me with nothing. I have created the following:
 
<apex:page >
    <apex:enhancedList type="Account" height="700" rowsPerPage="100" listId="{!Household_Accounts}" />
</apex:page>

However, I'm pretty sure it needs a record ID but Salesforce no longer creates separate record ID's for each list view... what to do?