All,
Thanks for taking the time to read this. I have an issue with creating a library record via web services.
AIM : Create a library Record -> Populate fields with data.
Sample Code:
ewarebase[] CRMBase = new ewarebase[1];//Allows reference to api
crmrecord[] libList = new crmrecord[1];
//Create a record
crmrecord aNewLibraryRecord = new crmrecord();
aNewLibraryRecord.entityname = "Library";
aNewLibraryRecord.records = new recordfield[3];
//Create fields to go in the above record
//FilePath
recordfield aFilePathField = new recordfield();
aFilePathField.name = "Libr_FilePath";
aFilePathField.value = "test";// getFilePath() ;
aFilePathField.type = crmrecordtype.@string;
aFilePathField.typeSpecified = true;
//FileName
recordfield aFileNameField = new recordfield();
aFileNameField.name = "Libr_FileName";
aFileNameField.value = getFileName();
aFileNameField.type = crmrecordtype.@string;
aFileNameField.typeSpecified = true;
//LeadID
recordfield aLibr_LeadIdField = new recordfield();
aLibr_LeadIdField.name = "Libr_LeadId";
aLibr_LeadIdField.value = GetLeadIDWithLeadQuery(WebService, XML);//Populate a string with an ID pulled from querying CRM Lead table. Using the XML Document details to peform a search in SQL
aLibr_LeadIdField.type = crmrecordtype.integer;
aLibr_LeadIdField.typeSpecified = true;
aNewLibraryRecord.records[0] = aFilePathField;
aNewLibraryRecord.records[1] = aFileNameField;
aNewLibraryRecord.records[2] = aLibr_LeadIdField;
libList[0] = aNewLibraryRecord;
addresult aResult = WebService.addrecord("library", libList);
Result of my code is that it creates a record ( as visible in the sql logs) - but does not add any of the fields in passing through.It only inserts the time created, time updated variables.
So big question:
How could I set up a way, using standard Sage CRM techniques to populate the library table with this information?
I would like to make a program that adds data into fields in my custom entity.
Thanks,
Matt