Quantcast
Channel: CRM Development 論壇
Viewing all articles
Browse latest Browse all 10280

Save function not working

$
0
0

We are creating Quotes using Scribe.  When a quote is opened by the user, we are loading the price list (this works fine), but when I try and save, there is an error, the ribbon is inactive and the form hangs.  When I close, we are not getting the usual MS error message dialog box.  If I remove the Xrm.Page.data.entity.save(); I can save using the ribbon.  Any ideas how to fix?

function SetDefaultPriceList()
{
//set default Price List
if(Xrm.Page.getAttribute("pricelevelid").getValue() == null)

    {
//Create an array to set as the DataValue for the lookup control.
var lookupData = new Array();
//Create an Object add to the array.
var lookupItem= new Object();
//Set the id, typename, and name properties to the object.
lookupItem.id = '07169356-148f-e111-97c8-00155d212418';
lookupItem.entityType = 'pricelevel';
lookupItem.name = 'List Price';
// Add the object to the array.
lookupData[0] = lookupItem;
// Set the value of the lookup field to the value of the array.
Xrm.Page.getAttribute("pricelevelid").setValue(lookupData);
Xrm.Page.data.entity.save();

   }
}


Ken Compter


Viewing all articles
Browse latest Browse all 10280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>