You need to sign in to do that
Don't have an account?

creating a sales invoice with financial force.
Hi everyone,
Our Company is using financial force accounting system, and I just wrote a trigger on the sales invoice object. Now when I wrote a test class for it, I use the code below:
c2g__CodaInvoice__c salesinvoice = new c2g__CodaInvoice__c(); //set values for the invoice c2g__Opportunity__c = opp.id; c2g__Account__c = acc.id;// opp and acc are already defined ...
... insert salesinvoice;
But when I run the test, I always get an error message "no current company". Does anybody know what causes this error and how to get rid of it? Thanks a lot!!
I am getting the same error.
I am trying to create a simple test class, and am getting the same error. I have populated all the required fields..
Were you able to resolve it?
Any feedback would be greatly appreciated.
First create a c2g__codaCompany__c record. Then Activate it using the custom button on the record page.
Create a 'User Company' assigning your user to that company from the related list at the bottom of the page.
Then go to Setup / Customize / Home / Home Page Layouts / Page Layout Assignment and assign the FinancialForce Layout to your profile.
Go to a non-setup page where you can see the left sidebar. The left sidebar near the top should show your 'current company'.
If you have no 'current company', a link saying 'Current Company not set' should appear there instead.
Click on the link and select a company from the list of companies that you have created.
Then create your invoice(s) as required.
http://amitsalesforce.blogspot.in/2015/05/creating-sales-invoice-with-financial.html.
PS: if this answers your question then Please hit Like and mark it as solution!
Thanks
Amit Chaudhary