Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JavaScript get Tenant ID from session

3 REPLIES 3
Reply
Message 1 of 4
anders.broddstedt
368 Views, 3 Replies

JavaScript get Tenant ID from session

How can I get the name of the current tenant my javascript is running in?

 

I'm generating emails with embedded url's pointing to items tabs etc. and I don't want to have to change the code for each tenant (Dev, QA, Prod, Demo etc)

It would be nice if I could get something like:

  • customTransID
  • customerID
  • customerToken

 //This does not work

var modByUsr = userID;

var modByUserDetails = Security.loadUser(modByUsr);

var strTenant = modByUserDetails.customerToken;

 

Please help!

3 REPLIES 3
Message 2 of 4
gasevsm
in reply to: anders.broddstedt

HI Anders,

Presently, this is not possible; you would need to hardcode the string. What are you trying to achieve with tenant names, if don't mind me asking? ))


Martin Gasevski | Fusion 360 Team Product Manager
Message 3 of 4
anders.broddstedt
in reply to: gasevsm

We have several different tenants, (Dev, QA, Test, Proto, Prod environments). We send emails when we get an error from an interface thath have similar test and production environments, with a artificial url that will lead to workflow tab etc. The url contains dmsid and workareaid, and tenant. If I hardcode the url for the tenant, then it won't work in the testing and production environment without code changes. If my code could get the tenant name then problem would be fixed.

Thanks,

Anders

Message 4 of 4
gasevsm
in reply to: anders.broddstedt

Thank you for the reply; the intent is clear. Getting tenant name via script isn't possible today as I had already mentioned. I don't have plans to add it, at least not near term. However, can offer a recommendation to create a picklist with all tenant options in all of your tenants such that you set a (default) value once, then referencing sucfrom affected workspaces without changing their scripts. Surely possibly simpler approaches can be achieved depending on your setup. Let me know in private if wish to explore alternates.


Martin Gasevski | Fusion 360 Team Product Manager

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report