Quantcast
Channel: Super Feed from MSCRM Technical Insight by Jonathan Nachman
Viewing all articles
Browse latest Browse all 130

Creating A CRM 4.0 Price List Product in C#

$
0
0

{codecitation style="brush: C#;"}

try

{

productpricelevel myproductpricelevel = new productpricelevel();

myproductpricelevel.uomid = new Lookup();

myproductpricelevel.uomid.type = EntityName.uom.ToString();

myproductpricelevel.uomid.Value = new Guid("6b7f1942-1724-4f10-a3c0-a3b93f26f8dd");

myproductpricelevel.pricingmethodcode = new Picklist();

myproductpricelevel.pricingmethodcode.Value = 1;

CrmMoney myamount = new CrmMoney();

myamount.Value = 1;

myproductpricelevel.amount = myamount;

Picklist mypicklist = new Picklist();

mypicklist.Value = 1;

myproductpricelevel.quantitysellingcode = mypicklist;

UniqueIdentifier myorganizationlookup = new UniqueIdentifier();

myorganizationlookup.Value = new Guid("73281161-9a4a-de11-8b92-00237d6135f5");

myproductpricelevel.organizationid = myorganizationlookup;

Lookup mypricelistlookup = new Lookup();

mypricelistlookup.Value = new Guid("5ad9cba7-5e4c-de11-8b92-00237d6135f5");

mypricelistlookup.type = EntityName.pricelevel.ToString();

myproductpricelevel.pricelevelid = mypricelistlookup;

Lookup myproductlookup = new Lookup();

myproductlookup.Value = new Guid(Row.productid.ToString());

myproductlookup.type = EntityName.product.ToString();

myproductpricelevel.productid = myproductlookup;

service.Create(myproductpricelevel);

}

 

catch (System.Web.Services.Protocols.SoapException ex)

{

 

throw ex;

 

}

 

{/codecitation}


Viewing all articles
Browse latest Browse all 130

Trending Articles