Error: This operation is not allowed when there are no records displayed. Please execute a query that returns - siebel

I have added the following code in the WebApplet_Load of Service Request Applet.It's giving me the above error once, I tries to open the SR screen from the application.
try
   {
      var currBC = this.BusComp();
      with (currBC)
      {
ActivateField("Restrict_drop_down");
ClearToQuery();
//BC.SetViewMode(3);;
TheApplication.SetProfilAttr("SR Type", GetFieldValue("Restrict_drop_down"));
        ExecuteQuery(ForwardBackward);
      }
   }
   catch (e)
   {
      TheApplication().RaiseErrorText(e.errText);
   }
Any idea on how to solve the issue?

You cannot do GetFieldValue when the BC is in Query mode. You have just done ClearToQuery, so you have to execute the query first, check for FirstRecord(); and then do a GetFieldValue();
Also, during the WebApplet load the first BC query is not finished running. It might not be the best place to write this code.
Please check with a siebel expert on your team, such kind of code needs to be placed carefully.

Related

Corda 4.7 QueryCriteria, LinearStateQueryCriteria

I have below query criteria to fetch State based on linearId. I am trying below code
//query criteria
QueryCriteria queryCriteria = new LinearStateQueryCriteria(
null,
ImmutableList.of(UUID.fromString(linearId))
);
However, I am getting a compile time error asking to change QueryCriteria to QueryCriteria.LinearStateQueryCriteria. If I do that, then vaultService.queryBy() does not accept the queryCriteria and throws a compile time error.
As per documentation, API: Vault Query - Custom queries in Java it should have worked. Can someone help ?
glad to see you figured it out, even though I'm not sure why IJ would flag the wrong error. In any event, here's my go-to code sample of making a query on a linear state.
link attached:
https://github.com/corda/samples-java/blob/master/Advanced/obligation-cordapp/workflows/src/main/java/net/corda/samples/obligation/flows/IOUSettleFlow.java#L57-L62

I am getting timeout error after loading table data using Power Query Editor. How can I proceed further?

I am getting the below error while selecting the "close and apply" option in Power Query Editor:-
We timed out waiting for page 'https://www.imf.org/en/Publications/WEO/weo-database/2020/April/weo-report?c=512,914,612,614,311,213,911,314,193,122,912,313,419,513,316,913,124,339,638,514,218,963,616,223,516,918,748,618,624,522,622,156,626,628,228,924,233,632,636,634,238,662,960,423,935,128,611,321,243,248,469,253,642,643,939,734,644,819,172,132,646,648,915,134,652,174,328,258,656,654,336,263,268,532,944,176,534,536,429,433,178,436,136,343,158,439,916,664,826,542,967,443,917,544,941,446,666,668,672,946,137,546,674,676,548,556,678,181,867,682,684,273,868,921,948,943,686,688,518,728,836,558,138,196,278,692,694,962,142,449,564,565,283,853,288,293,566,964,182,359,453,968,922,714,862,135,716,456,722,942,718,724,576,936,961,813,726,199,733,184,524,361,362,364,732,366,144,146,463,528,923,738,578,537,742,866,369,744,186,925,869,746,926,466,112,111,298,927,846,299,582,474,754,698,&s=PPPGDP,&sy=2014&ey=2021&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1'.
I modified the code in "Advanced Editor" tab by adding timeout argument as: Web.BrowserContents("https://microsoft.com", [WaitFor = [Timeout = #duration(0,0,10,0)]])
But still, I am unable to load the table data.
Please help to resolve this.
Try Increasing the Timeout parameter from 10 to more.
Like Web.BrowserContents("https://microsoft.com", [WaitFor = [Timeout = #duration(0,0,30,0)]])

PowerBI Embedded Export Data fails with "ExportDataFailed: Error generating details table"

Using powerbi-client 2.6.1:
let report; // set earlier
report.getPages().then(pages => {
const page = pages[0]
page.getVisuals().then(visuals =>
visuals[0].exportData().then(console.log)
)
})
This code throws an error that looks like this:
{
"message":"ExportDataFailed",
"detailedMessage":"Error generating details table",
"level":3,
"errorCode":undefined,
"technicalDetails":{
"requestId": undefined,
"errorInfo": undefined
}
}
I'm sure that the given page/visual are loaded, as they have finished rendering in the embed iframe. The visual in question has fewer than 1,000 rows so it's not the data limit.
Inspecting the code, I expect to see a POST request to be initiated when I call visual.exportData() but my network tab shows nothing.
Where is this error coming from?
More debugging information
The visual in question is a basic table with non-aggregated metrics.
Selecting the "export data" menu item in the ellipsis menu succeeds.
The error message suggests to me that the error logger blew up
What is the visual type you are trying to export data from?
Please note that export-data API works only if the visual use basic aggregations, and it doesn't work if the visihave measure.
Please read export-data docs and make sure you don't have some of the limitations described in the wiki.
In addition, you can do this sanity check: Go to powerbi.com, open your report there. then try to export to CSV. if it works for you, exportData API should work for you.

Status code in microsoft dynamics navision 2009

I am triing to figure out where the status code will be changed. Because If I try to book a order. and something goes wrong.then there will be a rollback. But in present day the status code will be changed, what not has to be. Because you cant book the whole order after. Status code has to be unchanged.
Thank you
The status code will be changed after this error:
And yes, I debugged the code
and in code unit: 7301 on this line:
END ELSE
IF FromBinContent."Quantity (Base)" + "Qty. (Base)" < 0 THEN
FromBinContent.FIELDERROR(
"Quantity (Base)",STRSUBSTNO(Text000,FromBinContent."Quantity (Base)"));
END;
I will get the error
Thank you
Oke, I found the piece of code where status code will be changed.
lRecStatus.FILTERGROUP(4);
lRecStatus.SETRANGE("Change Status",lRecStatus."Change Status"::Released);
lRecStatus.FILTERGROUP(0);
IF NOT lFncNextStatus2(vRecSalesHeader,lRecStatus,FALSE,FALSE) THEN
ERROR(lCtx000,vRecSalesHeader."Document Type",vRecSalesHeader."No.",vRecSalesHeader."Status Code");
lRecStatus.SETRANGE("Change Status",lRecStatus."Change Status"::01-NEW);
vRecSalesHeader.FIND('=');
So I added this:
lRecStatus.SETRANGE("Change Status",lRecStatus."Change Status"::01-NEW);
But how to set the value New - how it was? and not that the code goes to "vrijgegeven"?
Thank you
Oke. I found in codeunit: 1107570 this:
lRecStatus.FILTERGROUP(4);
lRecStatus.SETRANGE("Change Status",lRecStatus."Change Status"::Released);
lRecStatus.FILTERGROUP(0);
IF NOT lFncNextStatus2(vRecSalesHeader,lRecStatus,FALSE,FALSE) THEN
ERROR(lCtx000,vRecSalesHeader."Document Type",vRecSalesHeader."No.",vRecSalesHeader."Status Code");
vRecSalesHeader.FIND('=');
and if I comment this:
IF NOT lFncNextStatus2(vRecSalesHeader,lRecStatus,FALSE,FALSE) THEN
ERROR(lCtx000,vRecSalesHeader."Document Type",vRecSalesHeader."No.",vRecSalesHeader."Status Code");
then the status code will not been changed. But I dont know if this is correct, because maybe somewhere else goes wrong.
Thank you
If the status code is remaining updated after an error message, then the most likely cause is that a COMMIT has been issued after the posting routing is called but before the error message.
The OMS Tab on your Sales Order is appears to be the result of ether an ISV add-on or database specific customization, so it is hard to say for sure where the suspect code would be, there are a number of ways to find it.
The most straight forward way to find the code would be to user the Debugger (Tools -> Debugger -> Active / Breakpoint on Triggers) while repeating the process and step-in / over the transactions until you encounter a COMMIT statement.
If your more familiar with C/AL code (and have a sufficient license / permissions) you can open the form for modification and manually trace the code used to post the document.
Refactoring the code to remove a COMMIT can be quite tricky and if it is being changed inside the posting routing would likely require your Dynamics Partner or ISV to make the modification due to how the development license structure works.

SQL Server connection string "To few arguments"

I guess the solution is simple. I'm trying to connect to a SQL Express Server on my computer using the following line:
pConnection->Open("Data Source=PETERPAN\SQLEXPRESS;Initial Catalog=Mydata;User Id = Test;Password = Test;False");//(connectionstring,userID,pwd,longoption);
Two questions: Do I have to put every part of the connection string in "quotes" or simply the entire string? What is the "longoption" I am prompted for?
The error I get right now is: "To few arguments in function call"
I'm glad for any help. Have a nice day!
Lumpi
You don't mention what language you are using, but I'm betting that last false is not a part of the connection string, but a second parameter to Open();
pConnection->Open("Data Source=PETERPAN\SQLEXPRESS;Initial Catalog=MyData", "Test", "Test", False);
check out the website connectionstrings. They'll give you a wide option of what to send to the database that you have. A copy-paste of these connectionstrings should work just fine. I think that the one closest to what you describe would be SQL Server 2008.