How to Add New Record from Subgrid in Dynamics CRM with Easyrepro - crm

Does anyone know how to add a new record from subgrid in dynamics CRM with Easyrepro?
xrmApp.Entity.SubGrid.ClickCommand("subGridName", "button", null, null);
I used this line but it gives me an error saying no command of this name exists.
I just need to click the Add New button on the subgrid.

I found a custom way to do it as the Easyrepro team didn't make a built-in method for this.
I would search the button from its text and click on it as shown below.
Make sure the target window is the main window
var xrmBrowser = client.Browser;
var win = xrmBrowser.Driver.SwitchTo().Window(xrmBrowser.Driver.CurrentWindowHandle);
Find the button, let's say the button name is 'New Message' with its text and click on it.
win.FindElement(By.XPath("//*[text()='New Message']")).Click();

xrmApp.Entity.ClickSubgridAddButton("subGridName");

Related

how to mention a target blank in grid view. how to add target blank in action page

How to mention a target _blank in symfony action page?
$myRowAction = new RowAction('View', 'viewinvoice');
$grid->addRowAction($myRowAction);
If i click a (view) in grid page, the data display in new window.
Seem you are using the APY/APYDataGridBundle. Reading the doc here specify how to define the target of your link: is the 4th parameters of the constructor. As Example:
$myRowAction = new RowAction('View', 'viewinvoice', false, '_blank');
$grid->addRowAction($myRowAction);
Hope this help
For the future, please mention which library/framework are you using and what you tried. Take care to use the correct tag also (this issue is not about sf1.4)

Oracle Forms - EXECUTE_QUERY not working

I am trying to create a button which does exactly the same work of 'execute query' button in the smart bar.
Below are the steps I tried, but isnt working. Please tell me what am I doing wrong.
I am creating a simple form using Oracle XE Express Edition 11g and Oracle Forms 10g.
This is a very simple form that displays employee details (Form).
I created a button 'Display', which when pressed, calls execute_query;
When I clicked display button, it gives:
FRM:40202 : Field must be entered.
Additionally the cursor is blinking in the Employee ID field. The 'Execute Query' button in the 'Smart Bar' works fine.
Could you please show me how to make it work?
Ok Guys... Got the fix from a different forum.
Go to the property palette of the field where the cursor is (In my case it is Employee ID) --> Under 'Data' --> 'Required' --> set to 'NO'
The above method will work but a better approach is
in PLSQL Editor (button - When_button_pressed) - enter the below code
GO_BLOCK(NO_VALIDATE);
EXECUTE_QUERY;
Then in property palette --> Mouse Navigatable --> set to 'NO'
Save and run the form... You are good to GO.
write a query EXECUTE_QUERY(NO_VALIDATE);
then it will not show an error FRM:40202 : Field must be entered.

CRM Ribbon Workbench - Hide + Button on Sub-Grid

I have a sub grid on a new entity called Issues, the sub grid is for another new entity called Cost Detail.
I have them both loaded into my solution called Issue, and have opened issue in the ribbon workbench.
What I want to do is when you are on the Issue form and can see the sub-grid I want to be able to hide the + button which is displayed. However when I have hidden this button in the ribbon workbench it also hides the add new button in the 'Associated View' therefore no records can be added.
How do I do it so that only the + button on the sub grid is hidden and not the other view?
EDIT:
In order to hide the add button, you either need to take away create privileges to the role that the user is in or you could do a hack(unsupported) like this:
function hideAddButton(){
var addButton = $('#NameOfGrid_addImageButton');
if(addButton.size())
addButton.hide();
else
setTimeout(hideAddButton, 1000);//checks every second to see if the button exists yet
}
and call the hideAddButton function on form load
There is one answer that I found. If you have a field that unique for that entity, then you can do it with a simple javascript code.
Here is steps that you must follow in ribbon workbench:
Right click the button and customise button.
Add an enable rule, in Steps section add an Custom Javascript Rule, that contains your library and function name, please make sure that default is true.
This must be in your javascirpt library :
function hideAddNew(){
if(Xrm.Page.getAttribute("yourField")){
return false;
}
else {
return true;
}
}
Add a command that contains the enable rule we created.
Add the command to button.
That's it. I test it, it is working.

OnClick on ticketid need to open a details of ticket using birt report

I had a requirement to create a report based on individual user whom having SR waiting for approval, On click on Ticket id the URL's should redirect to SR detailed page where he can check request approve or disapprove.
using hyper link in birt properties unable to pass the ticketid by using below url's
http://google.com/maximo/ui/maximo.jsp?event=loadapp&value=asset&additionaleventvalue=Ticketid
Could you anybody help in this regards.
If the cell you made clickable contains the ticketId, go to Properties -> Hyperlink -> Edit...
Select hyperlink type URI, and click the dropdown to the right of 'Location' to go to the Javascript window.
If you're going to use it more than once, I would make the static part of your hyperlink a variable. Then add the ticketId by clicking "column bindings" in the left-lower column in the JavaScript window and selecting the appropriate cells in the middle and right columns. You'd get something like
vars["staticPartOfHyperlink"] + row[TICKETID]
If you'd rather not use a variable, you can hard-code the static part (don't do this, it's ugly and asking for trouble):
"http://google.com/maximo/ui/maximo.jsp?event=loadapp&value=asset&additionaleventvalue=" + row[TICKETID]

How to get AppointmentID on a buttonclick

I have created an outlook add-in where i have a ribbon that adds a button to the appointment tab. This button has a callback method that opens IE and goes to a specific page.
What i need: When you create an appointmnet and ID is stored somewhere(i assume).
I need to get the ID of the appointment that i have opend when i click on my button.
Simplify:
click on an appointment----->appointmnet has a costom button---->click the button--->open a page with the appointmentID.
I need to get the ID and add it to the url paramater when i open the page.
I have been reading up on the appointment global ID here:
http://msdn.microsoft.com/en-us/library/office/ff863645.aspx
And all the links that follow that article but I have not found anything that can help.
Im glad i have friends who know this better than me...
soloution here:
Outlook Ribbon Load Inspector.CurrentItem is null

Resources