• Alvin Tai
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Here are my objects:

Products
Serial Numbers (lookup relationship with a single Product)
Contacts (standard object with a lookup relationship with a single Product)

When I make a contact a "Community User", right now, he/she can see ALL Serial Numbers of ALL Products. I want to restrict his/her access so that they can only see Serial Numbers of a single Product (the one why are associated to).

This sounds like what I need, but I can't get it to work: http://salesforce.stackexchange.com/questions/27327/how-to-update-picklist-value-dynamically-from-custom-object

rigger populatePicklist on Code__c(After Insert){

  List<selectoption> newCodes= new List<selectoption> (SELECT Picklist__c from Unit__c where Unit__c.Part__r=Code__c.Part__r);
  
  newCodes.add(trigger.new[0].Name)
  update newCodes.values();


}

I'm pretty new to salesforce, so I'm not really sure if this is even the right direction...
Here are my objects:

Products
Serial Numbers (lookup relationship with a single Product)
Contacts (standard object with a lookup relationship with a single Product)

When I make a contact a "Community User", right now, he/she can see ALL Serial Numbers of ALL Products. I want to restrict his/her access so that they can only see Serial Numbers of a single Product (the one why are associated to).

This sounds like what I need, but I can't get it to work: http://salesforce.stackexchange.com/questions/27327/how-to-update-picklist-value-dynamically-from-custom-object

rigger populatePicklist on Code__c(After Insert){

  List<selectoption> newCodes= new List<selectoption> (SELECT Picklist__c from Unit__c where Unit__c.Part__r=Code__c.Part__r);
  
  newCodes.add(trigger.new[0].Name)
  update newCodes.values();


}

I'm pretty new to salesforce, so I'm not really sure if this is even the right direction...