1. For my WaterGrass application, I’m writing a trigger on the Transaction object that will search for the contact and account, and avoid duplicates. (Yes, I need my own trigger.) But I find that when I enter a payment via the Virtual Terminal or by an online form, the first and last name don’t get entered into the Transaction.firstname and Transaction.lastname and so I can’t use them. What happens to them? I know I can get them from the Data object, but really don’t want to have to do that, because I only want to create an Opportunity if the Transaction record is created. How can I access the raw first and lastname?
2. You’ve created an Opportunity Record Type C&P Online. I would like to use it for the opportunities I create. But although I can do this manually, when I try it in apex I get: System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record Type ID: id value not valid for the users profile: 012d0000000sfyRAAQ: [RecordTypeId]. I’m a Sysadmin. Is it possible that you have restricted access to the C&P Online record type so that I can’t create new opportunities of this record type?
Baird Straughan
2. You’ve created an Opportunity Record Type C&P Online. I would like to use it for the opportunities I create. But although I can do this manually, when I try it in apex I get: System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record Type ID: id value not valid for the users profile: 012d0000000sfyRAAQ: [RecordTypeId]. I’m a Sysadmin. Is it possible that you have restricted access to the C&P Online record type so that I can’t create new opportunities of this record type?
Baird Straughan
Comment