• tomoko_o
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hi,

 

I need some help on creating trigger for attachment for case and workorder object.
I found the code to make all attachment as private before insert, but how can I make it work only for case and workordre object?

Which field can tell what object the attachment is being attached to?

 

Thank you,

trigger PrivateAttachment on Attachment (before insert) {
  for(Attachment record:Trigger.new)   {
      record.IsPrivate = TRUE;
   }
}

 

 

Hello,

 

We are building customer portal and realized there are many internal attachment not marked as private.

To prevent our customer seeing our internal doc, I need to go thgouth each case and mark all as private.

Is there a way to do it with data loader? or if it can't be done with data loader, is therea any way to do it?

 

Also, I was requested to make default = private on all attachment at save.

How can I set default value in prigate field?

 

Thank you for your advise!

Hi,

 

I need some help on creating trigger for attachment for case and workorder object.
I found the code to make all attachment as private before insert, but how can I make it work only for case and workordre object?

Which field can tell what object the attachment is being attached to?

 

Thank you,

trigger PrivateAttachment on Attachment (before insert) {
  for(Attachment record:Trigger.new)   {
      record.IsPrivate = TRUE;
   }
}

 

 

Hello,

 

We are building customer portal and realized there are many internal attachment not marked as private.

To prevent our customer seeing our internal doc, I need to go thgouth each case and mark all as private.

Is there a way to do it with data loader? or if it can't be done with data loader, is therea any way to do it?

 

Also, I was requested to make default = private on all attachment at save.

How can I set default value in prigate field?

 

Thank you for your advise!