44
Views
8
Comments
Solved
Domain is changed when running Timer
Question

Hi!
I'm using the GetReactiveURL to create the URL of the detail screen.

When running it through a Timer, the domain changes to 127.0.0.1.

※ In reality, I want it to change to ossap.testusername.co.jp.

I want to know how to solve this situation.

I think that if '127.0.0.1' is replaced with 'ossap.testusername.co.jp', the domain will need to be stored using Site Property.

If there's a way to avoid storing the domain in the program, please guide me!

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello,

If you want to get the domain URL at runtime you can use GetRequestDomain server action, which will return you the current environment Domain at runtime.

You need to add the dependencies from the the HTTPRequestHandler Module 

You can also check this Post for reference - 

I hope this will help you

Best Regards
Tousif Khan

UserImage.jpg
NGUYEN DUC THOAN

Hello @Tousif Khan,
The information you shared is very helpful. Thank you very much!
Best regards ,
THOAN 

2023-10-21 19-42-11
Tousif Khan
Champion

Your welcome :)
I am glad, I was able to help.
Regards
Tousif Khan

UserImage.jpg
NGUYEN DUC THOAN

Hi @Tousif Khan ,
I tried your method, but it only works correctly when using a regular Server Action. 

However, when using a Timer, the results are not as expected. Can you provide an example of using a Timer? (If you have an OML file, that would be even better) .

Best regards ,
THOAN 

2023-10-21 19-42-11
Tousif Khan
Champion

I will have a look to it and will update you on this shortly.

Thanks
Tousif Khan

UserImage.jpg
NGUYEN DUC THOAN


Thank you for checking my message. I will wait for an update from you. 

Best regards ,
THOAN 

2024-09-17 08-54-53
Jerome Rajadurai J
UserImage.jpg
NGUYEN DUC THOAN

Hi @Jerome Rajadurai J ,

Thank you,  i will try the component  you shared.

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello,

If you want to get the domain URL at runtime you can use GetRequestDomain server action, which will return you the current environment Domain at runtime.

You need to add the dependencies from the the HTTPRequestHandler Module 

You can also check this Post for reference - 

I hope this will help you

Best Regards
Tousif Khan

UserImage.jpg
NGUYEN DUC THOAN

Hello @Tousif Khan,
The information you shared is very helpful. Thank you very much!
Best regards ,
THOAN 

2023-10-21 19-42-11
Tousif Khan
Champion

Your welcome :)
I am glad, I was able to help.
Regards
Tousif Khan

UserImage.jpg
NGUYEN DUC THOAN

Hi @Tousif Khan ,
I tried your method, but it only works correctly when using a regular Server Action. 

However, when using a Timer, the results are not as expected. Can you provide an example of using a Timer? (If you have an OML file, that would be even better) .

Best regards ,
THOAN 

2023-10-21 19-42-11
Tousif Khan
Champion

I will have a look to it and will update you on this shortly.

Thanks
Tousif Khan

UserImage.jpg
NGUYEN DUC THOAN


Thank you for checking my message. I will wait for an update from you. 

Best regards ,
THOAN 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.