Data in dropdown changed when item selected in another - stimulsoft

So i have the following form:
The manager team drop down works fine, but what i want is for the manager drop down to only show managers that are in the selected manager team, what i have in the SelectedIndexChanged event for the manager team drop down is:
GroupName2 = cbAmGroup.SelectedItem as String;
From what i can see the sql query to list the managers is not refreshed after the GroupName2 parameter is filled so it always shows no managers in the drop down since the parameter is empty at when it is run. This is the SQL query that gets the manager names for the drop downs:
SELECT AMName, a.AMID
FROM AM a
INNER JOIN AMGroupMember aMem ON a.AMID = aMem.AMID
INNER JOIN AMGroup AG ON aMem.AMGroupID = AG.AMGroupID
WHERE AMGroupName = #GroupName2

use GroupName2 = cbAmGroup.text;

Related

Need help in view delegate in custom screen

we created a custom screen which displays list of sales data based on filter conditions like (today, yesterday, this week, this month, this quarter, this year), we created a SQL view for this and then from VIEW we created and DAC and using it in custom screen. We also have filters in our screen. for filter conditions we are using view delegate and returning the data. the question is why the screen takes too long around 70 seconds to load 2K records. Is using view delegate decrease the speed of loading data. We can go with GI but we need to display images in the GRID so we opted for custom screen and also we have some report button in header which prints report. as we can't show images in GI we chose this.
The slowness you see is most likely caused by combination of two reasons.
When you use BQL view, it in fact requests only the number of records you see on the screen. For instance if you have grid with paging and only 20 records are visible on the page, the SQL select will have TOP 20 limitation. However, once you have select delegate, that optimization stops working since the framework does not know what you'd like to do with the data you select. The solution here would be to use SelectWithViewContext with DelegateResult return object instead of regular select. In that case user filtering, pagination and ordering is preserved in the select. (Use this method only if resulting records on the screen relate as 1 to 1 to the records you select. If you use any kind of aggregation or inserting records from 2 different select, that approach does not work)
Example:
protected virtual IEnumerable ardocumentlist()
{
PXSelectBase<BalancedARDocument> cmd =
new PXSelectJoinGroupBy<BalancedARDocument,
...
OrderBy<Asc<BalancedARDocument.docType, //Set necessary sorting fields: use the key fields
Asc<BalancedARDocument.refNbr>>>> //Set necessary sorting fields: use the key fields
(this);
PXDelegateResult delegResult = new PXDelegateResult
{
IsResultFiltered = true, //set these fields to indicate that the result does not need re-filtering, resorting and re-paging
IsResultTruncated = true,
IsResultSorted = true
}
foreach (PXResult<BalancedARDocument> res_record in cmd.SelectWithViewContext())
{
// add the code to process res_record
delegResult.Add(res_record);
}
return delegResult;
}
Probably you don't have proper indexes on your table since even if you select all 2k records at once it should not result in 70 seconds load time. Recommendation here would be to use the request profiler to catch the exact SQL generated (https://help-2020r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=e4c450bb-86bc-4fb2-b7e6-1f715abe3c8b) and execute the SQL in MS SQL Management studio with option 'Include Actual Execution Plan' (https://learn.microsoft.com/en-us/sql/relational-databases/performance/display-an-actual-execution-plan?view=sql-server-ver15) . Usually in this mode the MS SQL server suggests the indexes needed to speed up the query execution.

Assign Task to a parent (User Story) in TFS via excel

I imported a TFS query to excel to add a bunch of tasks. That part worked well. Now I just need to attach them all to their appropriate user stories (parent). I tried a bunch of different options in "column options", but none of them let me choose the task's parent. Is this even possible through excel?
You can achieve that by adding parent/child linked backlog items and tasks, please see Bulk add or modify work items with Excel for details.
In you case, you have bulk added the tasks to project,you need to link parent user stories by following below steps:
Select any task and link it to its' parent story (to generate the tree level title in query).
Create a Tree of Work items query like this:
Open Excel,New list > Select the created query above > OK
Edit the query in excel, move the Tasks title from Title1 to
Title2 accordingly based on their appropriate user stories.
Click Publish, check the Parent link in backlog.

Mulesoft salesforce connector getting subquery of commentcase does not display

I am creating a new project where it reads data from Salesforce and pushes the data into the Google Search Appliance (GSA). In the Salesforce SOQL statement, I have a query where it gets all the comments for the case. When I use Salesforce workbench, I am able to see all the CaseBody from the CaseComment for that case. But when I use the datamapper in MULE, the CaseComment.CommentBody does not display. Is there a way to log that into a file or on the console what the Salesforce is getting back? I tried to map the CaseComment as a List, but still no luck. Is there a way to see that that Salesforce Connector is returning?
Here is the SOQL:
SELECT Id, LastModifiedDate, CaseNumber, Subject, InternalSubject__c, Description,
IsClosed, POC__r.FirstName, POC__r.LastName, Owner.FirstName, Owner.LastName,
InformationFrom__c, Contact.FirstName, Contact.LastName, Account.Name,
ProductName__c, ProductVersion__c, ProductProblemType__c, SubjectMatterExpert__r.Name,
CaseProductRegion__r.Name, CaseProductModel__r.Name, CaseProductSecondaryModel__r.Name,
CreatedBy.FirstName, CreatedBy.LastName,
LastModifiedBy.FirstName, LastModifiedBy.LastName,
(SELECT CommentBody From CaseComments),
(SELECT Subject, Description FROM Tasks),
(SELECT Subject, Headers, Textbody FROM EmailMessages)
FROM Case limit 5
Here is the answer:
On the input side of the equation (left side of datamapper), right click on the top level Case, click on add field.
In the type, select Collection from the drop down.
In the name, type CaseComments (don't press enter yet or you won't be able to add the child elements).
Click plus on the child elements:
Change field_0 to queryLocator of type String. (Remember to press enter after typing in queryLocator or else the name falls back to field_0).
Click the plus again and type in done (Remember to press enter) of type String.
Click the plus again and type in size and select type Integer.
Now right click on the CaseComments, and add field again.
Type Collection
Name records (Don't press enter yet, click plus on the child elements)
Replace field_0 with CommentBody of type String (remember to press enter)
Replace field_1 with type of type String (Press enter)
Now do the same for the right hand side of the data mapper
Remember that you don't need to be at the top field, when you click the plus on the right side, it is actually Add metadata field, not just add field.
You need to map the CaseComments from the left side to the right side.
But you are not done yet. Just mapping the top field will not automatically map the fields underneath (needs improvement!)
You will need to map the records from the left side to the right side also.

Defaulting parent entity of custom activity

This should be a simple thing, but as I am quickly finding out with CRM 2011, simple things almost never are...
Anyway, I have a custom activity type, a "Trip". A Trip represents a single visit by a service technician to a client's site. Trips are always created in connection with a Case (Incident) and never with any other entity type, so the entity exists as a custom activity that does not "Display In Activity Menus". That allows me to drop a subgrid of Trips into the primary Case view, making it the only place these things can be created.
The problem is that when I try to create a new Trip from the Case form (by clicking the subgrid and choosing "Add New Trip" from the ribbon), the "Regarding" field isn't populated with the Case that I was on when I clicked "Add". Any of the "built-in" activity types will default their corresponding field with no problem, so it would seem to me that I can do the same here. The field's supposed to be read-only once this defaulting works, but just so I can set up the reference when creating new Trips, I've made it editable, and of course when you pop up the lookup, you can assign this Trip to anything (which is why I want the field read-only in the first place).
I need the form to default the parent Case when the Trip form loads. It has to be there when it's first created, because if it isn't there on the first save, then some plugin code that sets other default values (namely data relating to other Trips that may or may not exist for the same Case) won't work properly.
I read about relationship field mapping, where you can default the values of various fields based on fields of the parent entity, but the relationship between the Incident and my Trip is not listed as mappable from either side and I can't figure out how to make it mappable. I also know it's possible to set default values using JavaScript, but if there's a less "custom" way to set this particular behavior up I would love to know how.
As an epitaph based on Mike's comment, it does indeed seem that Microsoft doesn't want this done. But, it's still possible to do it. The basic steps are:
Download the Ribbon Workbench solution and import it into CRM.
Create a new solution containing the entity or entities you want to be able to customize.
Create a JavaScript file containing functions that will open the form you want and pass the information you need as a parameter. There are two ways to specify the parameters; you can define custom parameters on the form, or you can use Microsoft's undocumented parameters for the Regarding field:
function OpenNewTripFromCase()
{
var entityId = Xrm.Page.data.entity.getId();
var entityTypeCode= Xrm.Page.context.getQueryStringParameters().etc;
var entityDisplayName = Xrm.Page.getAttribute("title").getValue();
var params = {};
params["pId"] = entityId;
params["pType"] = entityTypeCode;
params["pName"] = entityDisplayName;
Xrm.Utility.openEntityForm("cst_trip", null, params);
}
Import this JavaScript file as a Web Resource, and add it to the Solution so it will be available to Ribbon Workbench.
Open up Ribbon Workbench and open the solution you created with your entity and resources. Click the Solution Elements tab, and find the "Commands" item. Right-click and select "Add New". Now expand the list, find and click on your new command. In the Properties pane, change the name of the command to be more descriptive (it's recommended you only change the third "Command#" term), then click the magnifying glass button to the right of the Actions field.
In the window that pops up, click "Add", then choose "JavaScript Function Action". A new item will be added to the action list. Click it, then in the properties pane to the right, find the library containing your function, then type in the function name. I didn't get any sort of IntelliSense here, so be careful typing in the function name. Add parameters if you need to (you shouldn't need to with the code above), then click OK
Now click the custom activity entity in the Entities list of Ribbon Workbench, then in the dropdown to the upper right of the ribbon layout, select the SubGrid ribbon. Create a button in this Ribbon, give it the icon and text you want, and in the Properties pane, set the Command to the command you just created.
Publish the customized Solution, and you should, if you did everything correctly, have a new button that will do the same thing as the "Add New" button when you've selected a sub-grid, but will additionally populate the Regarding field.

Create Task Items With Custom List Dataview in Sharepoint 2010

I created 2 custom lists in Sharepoint 2010:
List #1: INTERNAL PROCESSES (fields: Process Title, Reference)
List #2: PROCESS STEPS (fields: Step Title, Step Description, Process Title[lookup of 1 item in previous list], Department Assigned)
I created an action in the display form for list INTERNAL PROCESSES called "Create Instance"...when user clicks on it, redirects user to
mypage.aspx?processID={itemID}
(I couldn't find a way to pass the title instead of the ID in the querystring...)
Up to here is what I have done so far.
Now, I need to accomplish the following in mypage.aspx
1) lookup in INTERNAL PROCESSES using processID received in queryString, if field Reference is not NULL, ask user to enter a value for Reference
(eg. if Reference contains the word "Member", ask user to enter the Member Name)
2) get Process Title from list INTERNAL PROCESSES for processID received in querystring
3) For each list item in PROCESS STEPS where field Process Title matches Process Title looked up in step#2 , create a new TASK list item with the
following values:
a) TASK Title = Step Title + Value entered in step#1 (if any)
b) TASK Description = Step Description
c) TASK Assigned to = Department Assigned
I'd like to avoid using code, if at all possible because I've never done it, if code is required please point me in the right direction...thanks!
hey you would not required to use code if you are good at designing SharePoint designer workflows what you would have to do is create custom action using desginer and you can invoke a wrkflow using custom action, which would create a task for you in task list for more details have a look at following article
http://manish-sharepoint.blogspot.com/2010/01/creating-custom-actions-using.html

Resources