Open GoogleCodeExporter opened 9 years ago
If I've understood your request correctly, you want to set a property on an
Entity (e.g. an Account) which is an OptionSet in the CRM - for example, the
Country field on the Account.
To do this, you should be able to set using the numeric value, the description
or the DynamicsCRM2011_OptionSetValue class.
For example:
[code]
$crmConnector = new DynamicsCRM2011_Connector($discoveryServiceURI,
$organizationUniqueName, $loginUsername, $loginPassword);
$account = new DynamicsCRM2011_Account($crmConnector);
$account->Country = new DynamicsCRM2011_OptionSetValue(0, 'Afghanistan');
$account->Country = 0;
$account->Country = 'Afghanistan';
[/code]
You can also use the getOptionSetValues() function on the original entity to
determine valid values, for example:
[code]
$crmConnector = new DynamicsCRM2011_Connector($discoveryServiceURI,
$organizationUniqueName, $loginUsername, $loginPassword);
$account = new DynamicsCRM2011_Account($crmConnector);
$valid_countries = $account->getOptionSetValues('Country');
$account->Country = new DynamicsCRM2011_OptionSetValue(0, 'Afghanistan');
[/code]
If you're getting an error doing this, please post an suitable code snippet and
the error message you are receiving.
Original comment by N.M.Pr...@gmail.com
on 30 May 2013 at 9:51
thank i found the opetionset class after asking my question
Original comment by damiench...@gmail.com
on 30 May 2013 at 12:26
Original issue reported on code.google.com by
damiench...@gmail.com
on 27 May 2013 at 9:30