cancel
Showing results for 
Search instead for 
Did you mean: 

CreateEditableKeywordRecord() found in more than 1 place

Terry_Vantreese
Champ in-the-making
Champ in-the-making

What are the differences:

Application app = Connect(...)

var obj1 = app.Core.KeywordRecordTypes[index1].CreateEditableKeywordRecord()

var obj2 = app.Core.GetDocumentByID(index2a).KeywordRecords[index2b].CreateEditableKeywordRecord()

 

What are the differences between obj1 and obj2?

 

3 REPLIES 3

Timothy_Cosgrif
Star Collaborator
Star Collaborator

There are no differences. The only difference is the way you get to it.

The KeywordRecord objects are the same, so calling CreateEditableKeywordRecord off of either of them will generate the same object.

Sriram_Seshadri
Champ in-the-making
Champ in-the-making

Tim's answer is almost correct.

The objects obj1 and obj2 are mostly the same except obj2 contains the record instance ID of the record from which you created this EditableKeywordRecord. Therefore you cannot use obj1 in KeywordModifier.UpdateKeywordRecord. Since update by definition needs the id of the row you are trying to update which will not exist in obj1.

Terry_Vantreese
Champ in-the-making
Champ in-the-making

Thanks, Sriram, I needed to know that detail.

🙂