Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
We are trialling D365 Sales and are looking how to specify labour rates based on the client; either using a few pricelists (LabourA, LabourB,etc) or as a "Labour Rate" field under each Account.
I have set fields for currency and default price list by Account; is there a way to open a new Quote from Account to prefill default price list by Account?
We can use business rules to implement it, but we need to create many business rules with the number equal to the number of corresponding price lists..
To make up for the shortcomings of Business Rules in the onChange event, we need to treat one "conditions, action" as a single business rule, so that Business Rules can be triggered when the Account is modified.
Here is a demo.
I have 9 accounts.
My requirement is that when the customer is test 1 to test 3, the price list automatically becomes 'France Bill Rates'.
When the customer is test 4 to test 6, the price list automatically becomes 'CRM Service USA (sample)'.
When the customer is test 7 to test 9, the price list automatically changes to 'Basic Reseller'.
Because there are three price lists, I created three business rules.
IFPotential Customer equals "test 7" OR Potential Customer equals "test 8" OR Potential Customer equals "test 9"THENSet Price List to "Basic Reseller"
The effect is that when I manually modify the customer field, the price list also changes automatically.
Therefore, as long as multiple business rules are used, the onChange event of the price list can be triggered when the customer field is modified.
The recommendation to use business rules is to minimize conditional branches, so the business rules in the demo have only one conditional branch.
Conditional branch refers to the number of IF or Else IF.
Cheers for the detailed reply Hao but we have hundreds of clients; how would it scale?
Can Business Rules reference other entities? Could I retrieve the price scale from Account Entity and set that as Quote price scale?
1. Here is out of box Account Form (Product Price list will act as default price list)
2. Below is details tab in account form: (currency will act as default currency for account)
3. Navigate to Related and choose quotes
4. Click on "New Quote"
5. System defaults Price list and currency from Account
If you want to change the Currency and Price list on change of Account, you can leverage on "on Save" rather tahn "On Change". You can create one workflow to achieve this functionality rather than creating so many business rules.
1. Go to Settings --> Process --> New
2. Please refer the values in the below screen:
3. If you want this to happen to every user, set the scope to organization. To enable trigger on field change choose "record field change"
4. Click on select fields and select Potential Customer (customerid)
5. Add step --> Update record
6. Click on Properties
7. Keep cursor on "Price list" and on right hand side "Look for" choose "Potential Customer (Account)"
8. Choose "Product Price list", Click on Add and OK. This will populate dynamics value in Price list field as below
9. Repeat same steps for currency
10. Save and Close
11. Add a step "Stop Workflow". We should always stop a workflow once it is started.
12. Save and Activate Workflow
Now, when you change the Account in Quote and save, this workflow will default the price list and currency from account
Let me know if it works for you.
If the answer helped you, do not forget to mark answer as verified (by clicking 'Yes' above the answer)
Thank you for the reply, I added quotes to the navigation area under Entities-Accounts and that method does work as you've detailed. New quotes have currency and price list tied to the account when accessed from the Related tab.
Regarding a new entry under quotes however:
1) I can't save a quote without a price list (which is required to apply the workflow right?) so I created a business rule to set a default price list; this works well and populates on a new quote.
2) I created the workflow as you provided but when setting the customer on a new unsaved record, it doesn't replace the default price list even though it saves fine.
3) If I change to another customer after the record is saved, the workflow does work and changes the price list to the one under that customer account but it takes about 6 seconds (and manually refreshing) to show.
Is there a way (even if it is code) to update another field instantly on a field change so the sales person can immediately add products at the correct price?
Another thing I noted which is problematic is changing the price list without saving the record won't reflect which will lead to the possibility of incorrect prices.
I appreciate your help, thanks again.
Regarding your Point 2 --> for this to work --> The work flow triggering points "When Record is Created" should also be checked (as of now in my answer i gave "On field change" only). If you trigger workflow "On Record Create", the workflow will do the magic.
If you want instant result, you need to proceed with java script code.
When creating Quote from Account, we can use field mapping to let Quote's Price List inherit the value of Account's Product Price List.
Creaet a new N:1 relationship for Account entity, select Primary Entity as Price List.
Create a Mapping, map Price List and Product Price List.
In this way, whenever a new Quote is created from Account, the Price List of Quote automatically inherits the value of Account's Product Price List.
I changed the first workflow to "On Record Create" and created another workflow as your first post for subsequent changes and now both update instantly.
So all I need to do is now is check the form isn't unsaved before a new product is added and I'm good!
I've been reading where to add this code (as a function?) but not having much luck. I can see where to call it in the form.
Do I need to create a new library?
Edit: Think I've got it, new web rescource selecting Jscript. Will update steps if it works.
Ok I've got a working solution, thanks to ba365guy and Hao!
I created a business process that would assign a default price list to a new quote
I then created 2 workflows, one that would change the pricelist to the selected account on record save and another workflow that change the pricelist to the selected account on when 'Potential Customer" field was changed on existing quotes. Needed two workflows to accomplish new and existing quotes.
I was concerned that it was possible to add products before saving a pricelist change but as noted below this probably isn't an issue due to existing product pricing updated when the price list is changed but was a good exercise to use Jscript and the enhanced abilities so I included the steps.
I created a Jscript Web Resource and added a simple function that saves the current Entity Form. I'll need to add conditions to prevent errors where record can't be saved later. Be sure to publish after saving.
I then added this new Web Resource to the Quote Form I use by selecting "Form Properties" in the ribbon
I then double click on the "price list" field in the form designer and select my new library and function on the "Events" tab. I added the new Web resource library and function under 'Onchange" so everytime that field is changed, this jscript code will run.
Saved and published the changes to the Quote form and now changing the "price list" will force a form save!
As a pleasant surprise, changing a price list will also update pricing of any existing entries which is great!
So thanks again for the prompt help and hopefully this post will help others.
Glad that this problem was resolved.
Business Applications communities