November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
I haven't tested it, but you might be able to edit Apps\Order\Config\View\Grids\Orders-List.xml, and add a column into Columns section, like this
<Column width="200" allowSorting="false" dataField="AccountName" headingText="Account Name"></Column>
Note that this is not officially supported, and you will loose your change once you upgrade (i.e. you have to re-apply)
It is highly recommended that you make the change through an xml transformation, that way you can automatically re-apply it when upgrading.
Here is an example where we add a column to the list of payments on an PurchaseOrder, PurchaseOrder-ObjectView-Transform.xml:
<?xml version="1.0" encoding="utf-8" ?>
<!-- For more information on using transformations
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<View xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns="http://schemas.mediachase.com/ecf/view">
<Form>
<Grids>
<add>
<Grid placeName="OrderPayment-List" xdt:Locator="Match(placeName)">
<Columns>
<Column width="100" visible="true" allowSorting="false" dataField="TransactionID" headingText="Transaction ID" xdt:Locator="Match(dataField)" xdt:Transform="InsertIfMissing"></Column>
</Columns>
</Grid>
</add>
</Grids>
</Form>
</View>
Hi all,
I was added meta fields to Purchase Order, but unable to bind the same in commerce view.
Getting an error, if i mentioned custom property in Orders-List.xml as
in Ordrs-List.xml I was added below line
<Column width="100" allowSorting="true" dataField="AccountNumber" headingText="Account Name"></Column>
Now I looked into my book, it looks like you will need to use a custom template, basically like this
<Column width="150" allowSorting="true" dataField="AccountNumber" headingText="Account number" Align="Center" columnType="CustomTemplate">
<Template id="OrderStatusTemplate" controlUrl="GridTemplates/AccountNumber.ascx"></Template>
</Column>
Now it's quite conflicted, I wrote it in detail here https://leanpub.com/epicommercerecipes if you want to buy it, but if you don't, AccountNumber.ascx is just a simple user control that needs to inherit/implement BaseUserControl, IEcfListViewTemplate
Hi Quan,
May I know that whether we can have an Account Name from Purchase order instead of using Contact ID?
When we are using ConctId, Account details are updating to latest ones when user can have multiple accoutns.
Thank you!
Hi Everyone,
I have a requirement to add custom metafileds to purchase order class.
i used below code to add metafield.
var name = "AccountName";
var metaNamespace = "Mediachase.Commerce.Orders.PurchaseOrder";
var friendlyName = "Account Name";
var description = string.Empty;
var metaFieldType = MetaDataType.LongString;
var isNullable = true;
var length = 0;
var isMultiLanguage = false;
var isSearchable = false;
var isEncrypted = false;
var metaClass = OrderContext.Current.PurchaseOrderMetaClass;
if (metaClass.MetaFields.Any(x => x.Name == name))
return false;
var metaContext = OrderContext.MetaDataContext;
var metaField = MetaField.Create(metaContext,metaNamespace,name,friendlyName,description,metaFieldType,length,isNullable,isMultiLanguage,isSearchable,isEncrypted);
metaClass.AddField(metaField);
Adding value to this proprty as
purchaseOrder[OrderFields.AccountName] = cart.GetOrganization().Name.ToString();
Now the task is How can I show this field in Purchace Order List in Commerce.
Please share your comments on this.
Thank you!!