Breaking news from around the world
Get the Bing + MSN extension
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
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View 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 | Talent TechTalks | Upcoming TechTalks
I have a requirement to create a new record on click of a button.Using Xrm.WebApi.createRecord I’m getting the values while debugging but not able to create a record since I’m getting error.
I have two entities A and B
Product name-Lookup field
I have to populate these vales when i create entity B record but the field data types are different for some
Check box-OptionSet field
Product name-Text field
How can i achieve this? Any help will be much appreciated
Can you share the code you tried and the error you are getting.
For building webapi requests. you can use REST Builder, this is helpful.
Please mark as verified if this was helpful
Could you please share here code as well as error ?
The optionset should be set based on the value not text. The easiest way is to use Rest Builder tool and generate the code with some hardcoded values. You can then later pass these values as dynamic from your script.
"productvalid":twoOptionfield I guess you are setting a two options field with text, it should be set with value.
Did you try using the REST Builder as I suggested in my previous answer.
Please mark as verified if this was helpful.
There seems some problem in your "data" part. Instead of value you are passing the Text part. Also, check for null in all the variables which are initialized with field values using ternary operator. If there is no value in the field and it is not checked for null then also the rest of code does n't execute.
Please refer the below link :-
Hope it helps!
Please mark the answer as verified if it is useful to you.
Business Applications communities