Skip to main content
Solved

what event dispatch on the screen finish show?


Forum|alt.badge.img

Hi experts,

what event dispatch on the screen finish show? I want show WebDialogResult after screen finish show. 

I research RowSelected – occurs when system should show record to the UI., but it not suitable.

 

Thank for your help.

Best answer by aaghaei

The short answer is unfortunately you can not by C# code to the best of my knowledge. You will need to seek help from JS to disable the controls. for example you can check your SO status and disable the controls. Also, you might need to call the JS function in the screen client event. here is a blurb to give you a heads up but I have not tested it.

function disableFilesNotes()
{
	let isEnabled=true;
	let docStatus=px_alls['edStatus'].getValue();

	if (docStatus == "N" || docStatus =="C")
	{
		isEnabled = false

		document.getElementById("ctl00_usrCaption_tlbDataView").setAttribute("disabled","isEnabled");
	}
	else
	{
		isEnabled = true

		document.getElementById("ctl00_usrCaption_tlbDataView").removeAttribute("disabled");
	}
}	

 

View original
Did this topic help you find an answer to your question?

10 replies

Forum|alt.badge.img+10
  • Semi-Pro III
  • 229 replies
  • March 4, 2023

Hi @thanhaim ,

I got similar forum for the issue which you are facing.

Hope, this will help!

Regards,

Greytrix


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • March 4, 2023

@thanhaim Can you please provide a background and use case you are going to make it work?

RowSelected is triggered multiple times during processes of the records.

mid you care making changes and when everything was posted you want to do something, your best bet is RowPersisted.


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • March 5, 2023

@sweta68 thank you, a try many case: use Initialize() method, use SOOrder_RowPersisting(), SOOrder_RowPersisted() but not effective. What your solution this case?


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • March 5, 2023

Can you please answer my questions from the previous post?


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • March 5, 2023

@aaghaei Thank your reply. I want show Base.Document.Ask() when user into screen Sales Orders SO301000.

 


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • March 5, 2023

Sure but then what?


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • March 5, 2023

@aaghaei Thank you. In my case, I want disable 2 field Notes and Files (in the picture below) when Shipment = Confirmed → this thing could not. So my solution is show popup warning for user.

 


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • Answer
  • March 5, 2023

The short answer is unfortunately you can not by C# code to the best of my knowledge. You will need to seek help from JS to disable the controls. for example you can check your SO status and disable the controls. Also, you might need to call the JS function in the screen client event. here is a blurb to give you a heads up but I have not tested it.

function disableFilesNotes()
{
	let isEnabled=true;
	let docStatus=px_alls['edStatus'].getValue();

	if (docStatus == "N" || docStatus =="C")
	{
		isEnabled = false

		document.getElementById("ctl00_usrCaption_tlbDataView").setAttribute("disabled","isEnabled");
	}
	else
	{
		isEnabled = true

		document.getElementById("ctl00_usrCaption_tlbDataView").removeAttribute("disabled");
	}
}	

 


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1178 replies
  • March 7, 2023

@thanhaim 

please see my post here

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • March 7, 2023

@aaghaei Thank you so much. I try it now.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings