I have a big problem when adding product to quote. I narrowed this bug(?) to this situation and I can repeat it every time:
Create new organization
Customize quote entity to show list of related product - we want to add product using its main form (not quick create and not inline grid)
On customized quote form click add new product to show form like below
On this form fill Quantity field with any value
Final part - click twice on Pricing so you will get Override price and back to Use default.
In my case after I click second time on Pricing I get JavaScript error:
TypeError: Cannot read property 'errorCode' of null
at Object.<anonymous> (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=FormControlBundle&ids=1223231347-405283869:11181:26)
at Object.<anonymous> (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1497:44)
at j (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1418:29)
at Object.add [as fail] (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1437:69)
at Array.<anonymous> (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1495:32)
at Function.each (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:209:30)
at Object.<anonymous> (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1492:23)
at Function.Deferred (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1518:34)
at Object.then (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=JqueryBaseBundle&ids=727017229-892652631-1552783829:1490:26)
at Mscrm.TurboForm.Control.FormData.refresh (http://crodevcrm2/newcro/_common/JsProvider.ashx?bundle=FormControlBundle&ids=1223231347-405283869:11178:26)
But there is more...when I first fill all required fields like Existing product, Unit, Quantity and Price per unit and then click on Pricing record saves itself. When I change Use legacy form rendering to true in settings the error dissapears but save is still fired. There is no custom javascript here so what is the cause of this problem and how to fix this? If anyone could reproduce this on his environment I would be very gratfull.
I checked this on CRM 2016 (Update 1) and CRM 365 - both on-permise, both Polish language.
Related
I have a requirement to show a warning popup while navigating from a page to another page . The warning popup should be displayed when the second page is rendered based on the value of a binding(whether the binding has any value (rendered=true)
or is null(rendered=false)).How can i implement it such a way that the popup would be displayed when the second page is rendered itself?
Assuming few things:
1) By page you mean fragment.
2) You are on JDev 12c +.
This is something you may refer to:
execute code on fragment load
This tells you how to register a ControllerClass for your fragment page definition, and get hold of your phase Id.
You may also directly work with regionContext.getRefreshFlag().
However, please note that this code will fire for every request you make from that fragment. So once you close the warning popup, you should set a page-flow parameter which would prevent the popup from opening further.
For 11g releases, this functionality can be achieved by using the invokeAction binding to call a managed bean method, and setting the refresh condition as prepareRender.
Just add a showPopupBehaviour in the Form and make the TrigerType="load"
follow the follow this link : http://prabhat-java.blogspot.ae/2015/10/displaying-popup-on-page-load.html
I'm currently testing some stuff with Microsoft PowerApps. My aim is to create an app, which shows the calendar events of my office 365 account. I've applied the connection to office 365, and was able to get emails. But I don't know how to get the events, because nothing is documented. In the PowerAppStudio environment I can see that functions such as Office365.CalendarGetItem(... are available but the syntax is unclear. Please, can someone explain to me how to use it correctly.
My experience as follows;
You need to use
Office365Outlook.CalendarGetTables()
to get the Calendar object.Names and
Office365Outlook.CalendarGetItems()
To get the Calendar items for that object.
To demonstrate:
Add your Office365 outlook connector
Create a dropdown and take note of the name, or give it a new name
Set the Items value of the dropdown to Office365.CalendarGetTables().value
This gives you a your reference to get calendar items from - which you can now do with a gallery;
Add a gallery (I just pick a layout template I like and reconfigure)
Set the Items value of the gallery to Office365.CalendarGetItems(YourDropDownName.Selected.Name).value
where YourDropDownName is the name of the dropdown you created.
It will, by default, list from today's meetings onwards.
There are some filter options with CalendarGetItems, the syntax is as follows;
Office365Outlook.CalendarGetItems (string table, [advanced][Optional]string $filter, [advanced][Optional]string $orderby, [advanced][Optional]integer $skip, [advanced][Optional]integer $top)
I use this great reference as well PowerApps reference
You need to select a calendar where the items will be read.
Office365.CalendarGetItems(name of your calendar).value
Add the Office 365 connector as a connection
Create blank form
Add a listbox
Set ListBox>Items = Office365.CalendarGetTables().value.DisplayName
Add a gallery
Change gallery style to be Title and subtitle on Data tab
Dry gallery>Items = Office365.CalendarGetTables().value
You can now see your calendars and their names.
I'm going to futz around further with this...
In the "My experience" answer, I had to change "Office365." to "Office365Outlook.". I suspect content errors as the example of advanced options used "Office365Outlook.CalendarGetItems".
So
Office365.CalendarGetTables().value
Office365.CalendarGetItems(YourDropDownName.Selected.Name).value
became
Office365Outlook.CalendarGetTables().value
Office365Outlook.CalendarGetItems(YourDropDownName.Selected.Name).value
My Power Apps data source was "Office365Outlook" and my own email account at https://outlook.office.com/mail/inbox .
These worked for me.
I am using Orbeon forms with Hybris. We have several pages linked together where a user needs to go through them in a sequence (checkout process).
The content of the Orbeon form is dynamically being determined based on actions from previous steps. E.g.
If user adds Product A to the cart on the step 1, only two fields will be visible on the form located on step 2, if he adds another (Product B) on step 1, one more field should be visible on the form.
I am using certain preprocessor class which prefills some of the hidden fields on the form and then the logic for dynamic display is on the Form itself, based on those hidden fields. This works in a simple scenario when moving back and forth, through the steps.
However, the problem is that I need to have a HTML Mini-cart displayed on the page as well (not part of Orbeon Form), which can also trigger adding/removing of the products asynchronously.
So while I am on step 2 where the form is displayed, the user can also remove/re-add some of the products -> therefore, this needs to trigger asynchronous re-rendering of the form and change the display of the form (with new fields added or removed).
I'm using AJAX for this async stuff and the problem I am facing is that a lot of Orbeon-specific Javascript files and variables is being generated when the page loads for the first time, and some random FormID is used. This FormID is different when I retrieve the new form from the back-end and when trying to replace the HTML content I'm getting various errors in the console, because old Form id is used all over the place.
Does anyone have any suggestion if this could be achieved and how to approach this problem?
Update: Example of "hidden" field glass-coverage-selected
<xf:instance id=""fr-form-instance"" xxf:exclude-result-prefixes=""#all"">
<form>
<glass-coverage-selected/>
<section-1>
<massive-exterior-walls/>
</section-1>
...
Later, a bind is created:
<xf:bind id=""section-40-bind"" ref=""section-40"" name=""section-40"" relevant=""instance('fr-form-instance')/glass-coverage-selected = 'yes'"">
<xf:bind id=""previous-glass-insurance-bind"" ref=""previous-glass-insurance"" name=""previous-glass-insurance"">
<xf:required id=""validation-156-validation"" value=""true()""/>
</xf:bind>
And that bind is used to control the visibility of certain section:
<fr:section id=""section-40-control"" bind=""section-40-bind"">
<xf:label ref=""$form-resources/section-40/label""/>
<fr:grid>
<xh:tr>
<xh:td>
<xf:select1 id=""previous-glass-insurance-control"" appearance=""full"" bind=""previous-glass-insurance-bind"" class=""previous-insurance"">
<xf:label ref=""$form-resources/previous-glass-insurance/label""/>
<xf:hint ref=""$form-resources/previous-glass-insurance/hint""/>
<xf:help ref=""$form-resources/previous-glass-insurance/help""/>
<xf:alert ref=""$form-resources/previous-glass-insurance/alert[1]"" validation=""validation-156-validation""/>
<xf:alert ref=""$form-resources/previous-glass-insurance/alert[2]""/>
<xf:itemset ref=""$form-resources/previous-glass-insurance/item"">
<xf:label ref=""label""/>
<xf:value ref=""value""/>
<xf:hint ref=""hint""/>
</xf:itemset>
</xf:select1>
</xh:td>
</xh:tr>
</fr:grid>
</fr:section>
You can manipulate the values of form fields in JavaScript, in the browser. If you want to set the value of "hidden fields", you make sure that those fields as not hidden by putting false() under Visibility for the field in Form Builder. If you do this, for security reasons, the value of the field isn't even sent to the browser by Orbeon Forms, and it can't be set from JavaScript. Instead, to be able to set the value from JavaScript, you need to hide the control with CSS. The simplest way to do this is to add the class xforms-disabled for that field in the Control Settings dialog.
Then, assuming the name of the control in Form Builder is my-control, in JavaScript you can write var control = ORBEON.jQuery('*[id $= "my-control-control"]'); ORBEON.xforms.Document.setValue(control.attr('id'), '42');. Note the -control added at the end of the name of the control. And to test this first, I recommend you don't put the CSS class, so you can more easily see if setting the value works.
For the documentation on the above setValue() and other JavaScript APIs, see the page Client-side JavaScript API.
Is there a way to REQUIRE a PayPal dropdown to be answered? Currently, my choices are 1. Select One, 2. Satchel Brown, and 3. Midnight Black. If I skip it, it accepts "Select One" as the option. What to do? Leave the first option blank? I don't want to use a default answer.
Are you using a custom button (code generated using a form) or a paypal supported button that you generated the code for in paypal?
If you are using a paypal custom created button, create a confirmation page and have it post the users choice to there. Then, using php, check to see that the users choice is one of the valid options. If it is not, then simply use the header('Location: http://www.MyWebsiteHere.com/Wherever.php?&error=Unselected') to send them back to the page and add a error message so if(isset($_GET['error'])), then echo $correspondingErrorMessage. Very simple thing if you do it like this.
I want to change to button actions in the Magento admin orders section, and after looking at a lot of posts on here I can not find an answer that fulfills my question:
Question:
I want to be able to click the print invoice button on the order and have it automatically change to shipped status and when I add shipping to the order with a tracking number and click submit I would like that status to change to shipped.. and I was wondering how this could be done?
In summary:
status changed to shipped - when invoice is printed
status changed to complete - when order is shipped
I assume I would start in editing this section: app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
To change the status of an order the instruction is :
$order->setState('your state', true);
Ex. :
$order->setState('complete', true);
To have what you want you should edit the controller called when printing the invoice or creating the shipment. It's :
/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php in the printAction() method just after the line :
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
For the printing of invoice and
/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php in the saveAction() method just after the line :
$shipment->register();
But editing Controller is the most simple but the worst solution. If you know well Magento and php you could do this through Model or through events.
Best Regards,