+ Start a Discussion
manjirimanjiri 

Problem in sharing objects having multiple lookups

I have established lookup relationship by standard way.
I have 3 objects obj1, obj2, obj3. And obj1, obj2 are lookup fields in obj3
And it is working fine when i am manually creating objs obj1, obj2 and obj3 in my org1, it is getting created in org2.
But in my application there is need for criteria based sharing. So I have written trigger.
In that I am first creating obj1, obj2 which are lookup fields in obj3.
But when i am running trigger I am getting exception System.DmlException: Insert failed. First exception on row 0; first error: INVALID_PARTNER_NETWORK_STATUS,
When i search help for this exception it is said
"Attempting to forward a record from an object to which the connection is not subscribed results in an Invalid Partner Network Status error.

Don't forward a record to the connection that originally shared it. Doing so causes errors when Apex triggers run."

 

In connections my number of fileds subscribed and published are same. So i am not getting why this error is coming.
I have also tried it with apex script, but same exception I am getting.
Anyone come across the same issue? Any pointer/ solution will be appreciated.
Thanks,
Manjiri