0
votes

We are using Dynamics CRM v8.x. Our company is based in S.A, therefore the base currency is ZAR. Partners sell our products is USD. When an Opportunity is created from the Partner Portal, the currency defaults to ZAR. I have added update permissions in the Entity Permission to update the currency, but this is still confusing as the Partner should only be allowed to sell in USD.

1
Are you sending the currency $ from portal ? if not it will default to system default which is probably ZAR. - minohimself
The only way I can find to send the currency $ from portal is to let the partner specify the currency. This is confusing as they now have to choose between ZAR and USD, but they are only allowed to use USD. Any suggestions on how to send the currency USD from the portal? - Christo
if you can identify the data that was created from portal you can do it with workflow. In portal you can do it with liquid or Javascript - minohimself
I have tried doing it with workflow, but the currency still defaults to USD. I will give Liquid or Javascript a try. - Christo

1 Answers

0
votes

So I went for the Javascript option. On the "Create opportunity" entity view I added a field for currency. It is already on the form, but hidden. After adding the field, I added the Javascript to the "Create Opportunity" page:

$(document).ready(function(){
$("#transactioncurrencyid_name").attr("value","US Dollar");
$("#transactioncurrencyid").attr("value","fcad5419-1182-e911-a2cb-00155d000f0c");
$("#transactioncurrencyid_entityname").attr("value","transactioncurrency");
});

Should anyone ever need to change the default value of a lookup field in Entity Forms see this link: ADXStudio - Set values in Lookup fields of Entity Forms