Notifications
Announcements
No record found.
how do I setup price list items, other than doing it manually? I tried workflow but product field is read-only
*This post is locked for comments
This is possible with a plugin if necessary. I have done it plenty of times where a price list item needed to be automatically created by the system
Basically create a plugin to fire on create of the relevant record, probably in your case product, and create a price list item in C# code. I generally had a standard price list to use which I had defined in a settings entity
It requires a bit of custom code, but is reasonably simple. This code demonstrates how to create a price list item in C# code
Entity priceList = ...; Entity product = ...; var priceListItem = new Entity("productpricelevel"); priceListItem["pricelevelid"] = priceList.ToEntityReference(); priceListItem["productid"] = product.ToEntityReference(); priceListItem["uomscheduleid"] = product["defaultuomscheduleid"]; priceListItem["uomid"] = product["defaultuomid"]; priceListItem["quantitysellingcode"] = new OptionSetValue(1); //No Control priceListItem["pricingmethodcode"] = new OptionSetValue(1); //Currency Amount; priceListItem["amount"] = new Money(100); ///set price $100 IOrganizationService.Create(priceListItem);
Hi,
If you download the data template for PLI
You can do it in couple of ways.
1. Export and import the pricelistitems
2. Write a batch to read the latest values from list and update. This method you can schedule it using windows task scheduler and whenever there is an change in price you can drop the file to folder.your task scheduler runs and update the values automatically.
Hope this helps.If the suggestion resolved your query .Pls mark it as answered/verified to close the thread.
Thank you all for your timely responses. I was able to re-import the products file to the price list item entity and worked like a champ. Thanks to all!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2