• Sean Connolly 11
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
I'm developing an application on Heroku that needs to know if a specific User has access to a specific Account.  I'm using jsforce and can implement this via a simple soql query.  If the logged-in user has access to the account, it comes back.  If they do not, it doesn't come back.  

But ideally, I'd like to just have a boolean operation where I could supply an object type, an Id, a User, and find out if they have object-level access to that instance.  In other words, enforce any and all sharing rules including territory management and come back to me with a true or false.  Even better, be able to make the call without having the user themselves logged in, so calling from a system-level admin user account.

A describe of the Account object would let me know if its accessible in general, but that wouldn't tell me if this specific user has access to this specific Account.

Is there anything built into the api's that would support this?  Again, I'm not working in visualforce or on the Salesforce platform.  So I only have access via rest/soap calls into salesforce.

Thanks,
-Sean
 
I'm looking for a way to specify a url and either open it in a subtab if the user is in a console view or in a new window if they are not.

I can do this easily enough via javascript, lightning component helper, etc.  But is there anything in Salesforce to do this automatically?  Some sort of url hack that would do this?  I'm hoping to use this functionality to replace a bunch of javascript buttons that only need custom coding to handle this scenario...

Thanks,
-Sean
I'm in the middle of converting a large number of javascript onclick buttons over to Lightning Component actions.

I'm following the path of creating a new action and specifying a lighting component for it.  I have it working fine, but there are some wrinkles I would like to solve to reuse as much as possible here.  (I hate the fact that a short bit of javascript needs to be replaced by a .cmp file, a controller, a helper, and a apex control, even if I understand the reason)

One thing that would help is if I knew what button was clicked.  I haven't been able to find the source of the event that gets passed to the component.  Or rather, I see a source, but it doesn't seem to relate to the button on the first page.  The two things I need from the source button are what text is on the button and what tab the page is on if the user is in a console view.

Any suggestions?  Docs don't seem to mention this need.

Thanks,
-Sean
 

Is there a way to get the instance url for a specific sandbox without being logged into that org? 

I am attempting to assemble a list of Sandbox orgs along with their corresponding instance url's.  The idea being that logging in via test.salesforce.com leaves it up to the user which org they log into.  But if you direct them directly to the instance url, they will connect to the correct org.  As well as catching when an org is refreshed, and directing them to the correct page.  This is for an admin-type application where I have full access to the production org for any queries.

Via the tooling api, I have retrieved a list of SandboxInfo records that give me the active sandboxes.  Using the sandbox names found there, I can get the Org Id from SandboxProcess.  But from there, I'm stuck.  If you go via the UI, Salesforce gives you the option to login to a sandbox from the Setup->Sandboxes page, and it directs you to the correct instance url, so the information is obviously present somewhere.  

Put another way, I have an org id, is there a way via the production org and only using apis to figure out the instance url of the sandbox?

Thanks,
-Sean
 
 
I'm attempting to deploy Forecasting Settings between sandboxes using the metadata api and am receiving the following error:
"Provided predicate did not reduce to a singleton"
I looked through the settings file and didn't see anything obvious.  I tried removing the deprecated fields such as ForecastingCategoryMappings without any difference.  Using api versions 42 and 41, no difference.  When comparing the two metadata files from each sandbox, if I ignore the deprecated fields (which contain org-specific custom field id's like '00Nj000000AeTij'), there are no differences between the files.

So why deploy?  Good question.  :-)  Let's just say the CI script I'm working on says they are different due to the deprecated fields and so wants to move it over along with other changes.

Anyone have insight into what it's complaining about?

Thanks,
-Sean
I'm developing an application on Heroku that needs to know if a specific User has access to a specific Account.  I'm using jsforce and can implement this via a simple soql query.  If the logged-in user has access to the account, it comes back.  If they do not, it doesn't come back.  

But ideally, I'd like to just have a boolean operation where I could supply an object type, an Id, a User, and find out if they have object-level access to that instance.  In other words, enforce any and all sharing rules including territory management and come back to me with a true or false.  Even better, be able to make the call without having the user themselves logged in, so calling from a system-level admin user account.

A describe of the Account object would let me know if its accessible in general, but that wouldn't tell me if this specific user has access to this specific Account.

Is there anything built into the api's that would support this?  Again, I'm not working in visualforce or on the Salesforce platform.  So I only have access via rest/soap calls into salesforce.

Thanks,
-Sean
 
I'm in the middle of converting a large number of javascript onclick buttons over to Lightning Component actions.

I'm following the path of creating a new action and specifying a lighting component for it.  I have it working fine, but there are some wrinkles I would like to solve to reuse as much as possible here.  (I hate the fact that a short bit of javascript needs to be replaced by a .cmp file, a controller, a helper, and a apex control, even if I understand the reason)

One thing that would help is if I knew what button was clicked.  I haven't been able to find the source of the event that gets passed to the component.  Or rather, I see a source, but it doesn't seem to relate to the button on the first page.  The two things I need from the source button are what text is on the button and what tab the page is on if the user is in a console view.

Any suggestions?  Docs don't seem to mention this need.

Thanks,
-Sean
 

Is there a way to get the instance url for a specific sandbox without being logged into that org? 

I am attempting to assemble a list of Sandbox orgs along with their corresponding instance url's.  The idea being that logging in via test.salesforce.com leaves it up to the user which org they log into.  But if you direct them directly to the instance url, they will connect to the correct org.  As well as catching when an org is refreshed, and directing them to the correct page.  This is for an admin-type application where I have full access to the production org for any queries.

Via the tooling api, I have retrieved a list of SandboxInfo records that give me the active sandboxes.  Using the sandbox names found there, I can get the Org Id from SandboxProcess.  But from there, I'm stuck.  If you go via the UI, Salesforce gives you the option to login to a sandbox from the Setup->Sandboxes page, and it directs you to the correct instance url, so the information is obviously present somewhere.  

Put another way, I have an org id, is there a way via the production org and only using apis to figure out the instance url of the sandbox?

Thanks,
-Sean