Skip to main content
Bumped by Community user
Bumped by Community user
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script.

However, I'm getting the following exception when trying to query the unmanaged CS:

Custom Setting cannot be referenced outside code from the same namespace.

Does it mean I won't be able to copy them automatically? What is the best way to copy them then? I think I'm going to have to serialize them via unmanaged code but maybe there's a better way to do it.

This postThis post says that 'without sharing' would grant my post install script with access to all data but it doesn't seem to be working for my unmanaged custom settings.

Thanks

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script.

However, I'm getting the following exception when trying to query the unmanaged CS:

Custom Setting cannot be referenced outside code from the same namespace.

Does it mean I won't be able to copy them automatically? What is the best way to copy them then? I think I'm going to have to serialize them via unmanaged code but maybe there's a better way to do it.

This post says that 'without sharing' would grant my post install script with access to all data but it doesn't seem to be working for my unmanaged custom settings.

Thanks

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script.

However, I'm getting the following exception when trying to query the unmanaged CS:

Custom Setting cannot be referenced outside code from the same namespace.

Does it mean I won't be able to copy them automatically? What is the best way to copy them then? I think I'm going to have to serialize them via unmanaged code but maybe there's a better way to do it.

This post says that 'without sharing' would grant my post install script with access to all data but it doesn't seem to be working for my unmanaged custom settings.

Thanks

edited tags
Link
user39399
  • 1.1k
  • 1
  • 11
  • 17
edited body
Source Link
user39399
  • 1.1k
  • 1
  • 11
  • 17

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script.

However, I'm getting the following exception when trying to query the unmanaged CS:

Custom Setting cannot be referenced outside code from the same namespace.

Does it mean I won't be able to copy them automatically? What is the best way to copy them then? I think I'm going to have to serialize them via unmanaged code but maybe there's a better way to do it.

This post post says that 'without sharing' would grant my post install script with access to all data but it doesn't seem to be working for my unmanaged custom settings.

Thanks

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script.

However, I'm getting the following exception when trying to query the unmanaged CS:

Custom Setting cannot be referenced outside code from the same namespace.

Does it mean I won't be able to copy them automatically? What is the best way to copy them then? I think I'm going to have to serialize them via unmanaged code but maybe there's a better way to do it.

This post says that 'without sharing' would grant my post install script with access to all data but it doesn't seem to be working for my unmanaged custom settings.

Thanks

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script.

However, I'm getting the following exception when trying to query the unmanaged CS:

Custom Setting cannot be referenced outside code from the same namespace.

Does it mean I won't be able to copy them automatically? What is the best way to copy them then? I think I'm going to have to serialize them via unmanaged code but maybe there's a better way to do it.

This post says that 'without sharing' would grant my post install script with access to all data but it doesn't seem to be working for my unmanaged custom settings.

Thanks

Error message highlighted
Source Link
Sergej Utko
  • 22.1k
  • 11
  • 60
  • 88
Loading
Source Link
user39399
  • 1.1k
  • 1
  • 11
  • 17
Loading