0

Im new to Salesforce and trying to create my first object via the api. I can successfully query for an Incident but when i try to add an Action on to that query, i get a number of invalid field errors etc.

 BMCServiceDesk__IncidentHistory__c action = new BMCServiceDesk__IncidentHistory__c()
 {
      BMCServiceDesk__FKIncident__r = incidentReference,
      BMCServiceDesk__description__c = "Internal Note (Not visible in self service)",
      BMCServiceDesk__note__c = "Some note..."
      //BMCServiceDesk__actionId__c = "00011057_6"
 };

The problem I have is although the actionId is of type string, trying to enter some text or any id in there results in an Invalid Field exception. My question is: Is there any code examples of how to do this or is there any way to get a mandatory field list and what values are expected?

Thanks, Chris

1
  • It may be that there is a BMCServiceDesk__Action__c object and that you need to insert one of those, get its ID and then set that in the BMCServiceDesk__IncidentHistory__c.BMCServiceDesk__actionId__c field (as the foreign key). You should be able to see the objects and how they are related under Setup -> Create -> Objects in the org.
    – Keith C
    Nov 14, 2014 at 10:49

1 Answer 1

0

It's been a while since I worked on BMC Remedyforce, but if I recall correctly, BMCServiceDesk__actionId__c might be a lookup field.

If this is so, you need to give BMCServiceDesk__actionId__c the record ID of the BMCServiceDesk__Action__c you are trying to reference, and not 00011057_6 which I'm assuming is the name/title of the action record.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .