How can I add service call in SAP B1 SDK? - sapb1

I want to add service call in SAP B1 SDK but I'm getting the following error message
Notice: Trying to get property of non-object in C:\wamp
Error:-5002
Below are sample codes of PHP
$oService=$mycomp->GetBusinessObject(191);
$oService->CallType=5;
$oService->CustomerCode="460201";
$oService->subject="Text here";
$oService->Add;
Is there any other field which is mandatory

Related

How to set shipping method using “cart_shipping.method” in magento api v1

I want to set shipping method using "cart_shipping.method" but it's giving me fetal error. Error message is "Uncaught SoapFault exception: [1062] Shipping method is not available". I am using method like that
$result = $proxy->call($sessionId, 'cart_shipping.method', array(1402,'flatrate'));
I had the same problem because I was using test information which was not valid in the address call (cart_customer.addresses (SOAP V1) or shoppingCartCustomerAddresses (SOAP V2)).
So try a valid address which also works in the front end. For example, if you use the wrong country, magento will probably think: shipping is not available for this country. And then throw the 1062 error you experienced.
Maybe you had the same problem.
(btw I am using this as an example: https://magento.stackexchange.com/questions/6424/how-to-create-order-using-magento-web-services-in-php)

wfNotify in IDOC to send mail | csScriptMustBeInWorkflowContext

I have created & called a custom service in my custom template to send mails to users when document gets sent/reject/approve. I want to copy myself in BCC in these mails so that in case of any issues, i could cross check. is there a way i can enter a specific mail address in this code. below is the code i 'm using. Will "wfNotify" be of any help?
code used
<$executeService("APPROVAL_MAIL_PILOT_USERS")$>
<$loop IS_PILOT_USER$>
<$userValue=IS_PILOT_USER.USEREXISTS$>
<$endloop$>
<$if strEqualsIgnoreCase(userValue,"1")$>
----MailFormat----
P.S- when i use wfNotify -> , i get the error
Caused by: intradoc.common.ServiceException: !csScriptMustBeInWorkflowContext,wfNotify
*ScriptStack !csDynHTMLStackDumpStart,pbhati,(datasummary)IdcService=WORKFLOW_SENDTO\,dDocName=D_1247583\,dID=1421894!$
!csDynHTMLNoStack!$
!csDynHTMLErrorMessage,/u01/Oracle/Middleware/user_projects/domains/base_domain/ucm/cs/custom/Workflow/templates/Workflow_reviewer_mail.htm,44,3!csDynHTMLReportMsgFunction,wfNotify!$
-><$wfNotify(xDocOwner,"user")$>
As far as I know, wfNotify can only be called from inside a workflow event which is why you are receiving the csScriptMustBeInWorkflowContext error.
As to a service or Idoc Script function (besides wfNotify) that can be used to send an email to a specific user/alias/token and use a custom template, I could not locate one.
You could create your own scriptable service (which you can then call from Idoc Script) or an Idoc Script function that would allow for this.
You can call wfNotify with the specific username.
But the user must have their email details completed in the user table.
Your second error with the wfNotify call - are you calling wfNotify with a 3rd param for the template?
If so - eliminate this as a source of your problem by just calling wfNotify with the first two params.
wfNotify Oracle Documentation

Rally updating Team Members to Project

I have looked at "How can I update Rally team membership?" but couldn't figure out how it works for Ruby Rally WSAPI. So this is my update query when I try to update team membership for a Project
#team is an array that consists of RallyAPI (user) objects.
#rally.update("project",project_ref,team)
My question is about the project_ref that I am passing as an identifier for the project to be updated, is it the "_ref" that we have to pass to this query or the "ObjectID" of the project, for the update query to work?
I get this error when I try
#rally.update("project",project["_ref"],team)
not authorized to perform action: invalid key
On trying this:
#rally.update("project","_ref|#{project["_ref"]}",team)
I get the same error. When I tried this query:
#rally.update("project","ObjectID|#{project["ObjectID"]}",use_array)
I get an error as "Could not find webservice for '...'using request method "POST", However a service does exist at the path using method "GET".

Flurry Event API not returning event parameter values

I have been trying to use the EventMerics API to return detailed event parameter data.
I have setup a test application and have uploaded event data with parameters, I can see the data in the web interface.
However the API doesn't seem to return the parameter data as stated by the documentation.
The following call
http://api.flurry.com/eventMetrics/Event?apiAccessCode=xxx&apiKey=xxx&startDate=2012-08-27&endDate=2012-08-27&eventName=heatmap%20-%20iPhone-Title-all
returns:
<eventMetrics type="Event" startDate="2012-08-27" eventName="heatmap - iPhone-Title-all" endDate="2012-08-27" version="1.0" generatedDate="8/27/12 10:45 PM">
<day uniqueUsers="2" totalSessions="12" totalCount="14" date="2012-08-27"/>
<parameters/>
</eventMetrics>
....
The parameters section is empty, I am expecting the following parameter values:
{touchXY : 299,465,2012-08-27 16:40:15 +0100}
{touchXY : 301,461,2012-08-27 16:29:03 +0100}
{touchXY : 192,312,2012-08-27 16:22:54 +0100}
{touchXY : 254,461,2012-08-27 16:23:04 +0100}
Has anyone got parameter values to return via the Flurry REST API?
the API call used by you is correct. I would recommend you to write to support#flurry.com to investigate why this is not happening.
(Disclaimer: I work in the Support team at Flurry)
The event name in the request is case sensitive so you should check the way it's written on the site. I changed mine from "editor" to "Editor" and the problem resolved.

Adding file in S3 from salesforce using S3 API

I have installed AWS S3 toolkit on sdfc. I have the following code where AWS_S3_ExampleController is part of the installed toolkit. When i execute this code the debug log shows the generic "internal Server error" 500.
The returned soap message has
soapenv:Value>ns1:Client.InvalidArgument soapenv:Value soapenv:Code soapenv:Reasonsoapenv:Text xml:lang="en"Invalid id /soapenv:Text/soapenv:Reason soapenv:Detail ArgumentValue>SAmeer Thakur ArgumentValue>ArgumentName>CanonicalUser/ID/soapenv:Detail>soapenv:Fault> soapenv:Body>soapenv:Envelope>
I do not know how to resolve the Invalid id being seen
AWS_S3_ExampleController c = new AWS_S3_ExampleController();
c.constructor();
c.fileName=fileName;
c.OwnerId='Sameer Thakur';
c.bucketToUploadObject= bucketName;
c.fileSize=100000;
c.fileBlob= Blob.valueOf(record);
c.accessTypeSelected='public-read-write';
System.debug('Before insert');
c.syncFilesystemDoc();
System.debug('After insert');
Any pointer would be appreciated
Thank you
Sameer
The problem was i needed to define ownerid with canonical value.
This value is generated using access key and secret key.
The url to generate canonical user id value is # http://www.bucketexplorer.com/awsutility.aspx
regards
Sameer