Advertisement
RyanFarley

Untitled

Jan 23rd, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. // get the user option for default currency
  2. var userOptions = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Application.Services.IUserOptionsService>();
  3. var defaultCurrency = !string.IsNullOrEmpty(userOptions.GetCommonOption("lveCurrency", "OpportunityDefaults"))
  4.     ? userOptions.GetCommonOption("lveCurrency", "OpportunityDefaults")
  5.     : "USD";
  6.  
  7. // now set for opportunity
  8. opp.ExchangeRateCode = defaultCurrency;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement