• Bugga
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I've defined apex sharing reasons on a custom object, depending a certain feild value there is a formula feild which is storing the value of the rowcase in this format Schema.XXXXXX__Share.RowCause.MySharing__c

I want to use this directly in the after insert trigger. 

                       bShr.ParentId = relid;
                        bShr.UserOrGroupId = bui.Expert_Name__c;
                        bShr.RowCause = bui.Rowcause__c;                                                                          ------- Doesnt work even if the same value is stored
                        //bShr.RowCause = Schema.
XXXXXX__Share.RowCause.MySharing__c; ------ Works fine 
                        bShare.add(bShr)

Could you please suggest if i am doing anything wrong here or suggest any other way ? I need to use different sharing reasons which is calculated in the formulae feild. I can get that to the trigger but that is my last option.

Please let me know.

 

 

  • March 23, 2014
  • Like
  • 0

Hi ...

 

I am relatively new to Salesforce and was facing this issue. 

 

Could anyone kindly help ?

 

I have data in excel having degree symbol and when i change to csv it vanishes and some junk values come up.. i managed to get around tat by copying UTF -8 format of CSV 

 

But once this file is uploaded usig apex data loader, it is not able to understand the degree format and converts it into a junk value.

 

please help

 

thanks

  • October 21, 2011
  • Like
  • 0