Adding Activity to Sales Opportunity stage
I'm trying to create a new activity using the DI API and link it to a certain Sales Opportunity stage.
I've been looking at the SalesOpportunities and SalesOpportunitiesLines objects to see if I could add an activity there, and I've looking at the Contacts object to see if I could set the SalesOpportunity (stage) there.
Neither seems to be possible.
Does anybody know how to link activities to sales opportunities?
its object Contacts
there fill properties
DocType to 97
ParentobjectId and Parentobjecttype
I recommend to create one activity by hand through sbo and make select from OCLG table and check, what is tehre filled.
Similar Messages
-
Outlook Integration - email as Activity of Sales Opportunity
Hello all,
Is there an option to attach an email from Outlook to Sales Opportunity as Activity? Outlook Integration offers a lot of document type, business partners, items, etc., but not Sales Oportunity.
I really need it for our customer so any ideas how to make it are welcome.
Regards, RomanI haven't found any solution for adding an activity to a sales opportunity with the DIAPI except direct update of the DB. It's not even possible to add a "Follow Up" activity to activity linked to a sales opportunity, DIAPI loose link to sales opportunity.
According to [1075696|Link activity to an opportunity level DIAPI; and [966860|Adding Activity to Sales Opportunity stage; it is still not possible to do that in DIAPI
Interesting that in the DTW we can do that... -
Sales Opportunity Stage Tab - Want last updated row details in query
Dear Experts,
I have a query as under :
SELECT T1.Name, T1.OpprId, T1.OpenDate, T0.Step_Id, T0.Line, T0.OpprId, T0.U_status, T2.Name FROM OPR1 T0 INNER JOIN OOPR T1 ON T0.OpprId = T1.OpprId INNER JOIN [dbo].[@STAGE] T2 ON T0.U_status = T2.Code WHERE T1.Name = 'ORDER'
Now I want that this query should give me the last row detail in the Stage TAb of Sales opportunity. Now this query is giving me every row stage details which are put in the Stage Tab. For example in the Stage Tab of Sales Opportunity there are 4 rows of Stages, its giving me all the 4 row stages in the query. I want that only the last stage should be displayed in the query may be it's on 2 second stage or 3 rd ot 4 th. I want only last stage to be shown.
Please advise what I need to do for the above query.
Regards,
KamleshHi All,
I have been working in a query to generate the last stage details in the query but still not able to resolve it.
SELECT T0.Status,T0.OpprId, max(T1.Line) 'Stage',T0.OpenDate, T0.CardCode, T0.CardName, T0.Territory, T0.CloPrcnt,T1.OpprId, T1.Line, T1.OpenDate, max(T1.OpenDate) 'Open Date',T1.CloseDate, T1.Step_Id,T2.descript, T3.Name, T0.MaxSumLoc, T4.U_swl, T0.MaxSumSys, T0.U_eqno, T0.MaxSumLoc, T4.U_partno, T4.U_desc, T4.U_unit, T4.U_amt, T4.U_qty, T4.U_amt, T4.U_span FROM OOPR T0 INNER JOIN OPR1 T1 ON T0.OpprId = T1.OpprId INNER JOIN OTER T2 ON T0.Territory = T2.territryID INNER JOIN [dbo].[@STAGE] T3 ON T1.U_status = T3.Code, [dbo].[@SALES_ENQ_ITEM] T4 WHERE T0.OpprId = T4.U_opprNo AND T0.Status = 'O' group by T0.Status,T0.OpprId, T0.OpenDate, T0.CardCode, T0.CardName, T0.Territory, T0.CloPrcnt,T1.OpprId, T1.Line, T1.OpenDate, T1.CloseDate, T1.Step_Id,T2.descript, T3.Name, T0.MaxSumLoc, T4.U_swl, T0.MaxSumSys, T0.U_eqno, T0.MaxSumLoc, T4.U_partno, T4.U_desc, T4.U_unit, T4.U_amt, T4.U_qty, T4.U_amt, T4.U_span
The above query is generating and giving me the Last Stage through max(T1.Line) 'Stage' field. But I want to have if any opportunity Number has 1,2,3 Stage then only Max should should which is 3 but in this query all 3 are showing.
As per Noratam ''There are other options by checking max of the start-date and stage-key fields of the sage table''.
I can use the Start Date which seems to be max(T1.OpenDate) 'Open Date' but how to give a formula or write a query by which only Max Date is selected as per the stage in the query.
I think I am not able to use the Max funtion properly. Please help what is wrong with it.
Can you please help in this regard.
Regards,
kamlesh
Edited by: Kamlesh Gupta on Mar 22, 2009 11:33 PM -
How to save an email to an open activity or sales opportunity
Hello,
I am wondering if i can save an email via Outlook save email as an activity to an already open series of activities as a follow up activity.
ThanksBrenton,
Outlook does not integrate to SAP Business One unless you have installed the SAP Business One Outlook Integration add-on that comes on the SAP Business One installation media.
Eddy -
Last stages of Sales Opportunity in XL reporter
Hi all!
I would like to print last stage of Sale opportunity in Xl reporter. NOw, i only show all all stages in report but i want only last satges.
Could you help me!
Thanks!Hi
Please take the stages in the Parameter. so that you can take the report as per the stages
Hope it help
Ashish Gupte -
Stored procesdure for UDT linked to UDF in Stage of Sales Opportunity
Dear All,
I have an User Defined Table named 'process' in Sales Opportunity Row Stage Tab with some values as 1.1, 1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0 so on which is connected to a user defined field named 'Reasons'.
Now the user does the sales opportunity entry and in the stage tab selects the process e.g 1.5 in the user defined field. Now I suppose 1.5 has a reason name of lost to others. Now I want to add a stored procedure that if the user selects lost in the Sales Opportunity summary tab and he has not selected the reason which is between 1.5 to 1.9 ( means lost reasons ) the sales opportunity should not get saved. An error message should show as please select proper reason.
Can it be achived through SP. I think we can do it but cannot make the SP could you please guide and help me to resolve this issue..
Appreciate your quick and positive response.
Regards,
KamleshHi,
I am trying to make the SP for cross checking the Lost reason if it is not put which are between 6.0 to 7.0 when the user selects lost in the summary tab but I am getting an error while executing the SP as - Msg 102, Level 15, State 1, Procedure SBO_SP_TransactionNotification, Line 243 Incorrect syntax near '='.
Note the followings :
In the OPR1 row I have a udf named U_Status
My SP is as under :
IF @transaction_type IN (N'U') AND @object_type = '97'
begin
if exists (SELECT * FROM [dbo].[opor] T0 INNER JOIN [dbo].[opr1] T1 ON T0.OpprId = T1.OpprId where T0.Name ='MACHINE' and T0.Status ='L' and T1 (U_status ='0' or U_Status ='1.1' or U_Status ='1.2' or U_Status ='1.3' or U_Status ='1.4' or U_Status ='1.5' or U_Status ='1.6' or U_Status ='1.7' or U_Status ='1.8' or U_Status ='1.9' or U_Status ='2.1' or U_Status ='2.2' or U_Status ='3.1' or U_Status ='3.2' or U_Status ='3.3' or U_Status ='3.4' or U_Status ='4' or U_Status ='4.1' or U_Status ='4.2' or U_Status ='4.3' or U_Status ='5' or U_Status ='5.1' or U_Status ='5.2' or U_Status ='5.3' or U_Status ='5.4' or U_Status ='5.5' or U_Status ='5.6')and T0.opprid =@list_of_cols_val_tab_del)
begin
SELECT @error = 10, @error_message = N' Please put proper reasons for Losing the Opportunity'
end
end
Would be obliged if you can throw some light in it.
regards,
kamlesh -
Sales Opportunity - Sales Stage
Hi experts,
On the sales opportunity window, in the stages tab, the stages field has a Define New option. Is there a way to remove the Define New option. We do not want users to define their own stages.
Thanks!
JaneHi Jane,
Please use Additional Authorization Creator Window to restrict users from accessing User Tables.
Definition
Use this window to create and add a new permissions object for user-created forms.
To get here.. Admin.>System Init > Authorization > Additional Authorization Creator
In the Additional Authorization Creator window, enter an Authorization Id and Name, From the option dropdown Select the options you want.
To enter the FormID, Click Edit and enter the Form Number of the User defined table.
NOTE: To get the Form number open the user defined table and on the Status Bar at the bottom you can see the Form=xxxxx (number), in your case 733. Use this number. To view the form details on the status bar, please click View > System information on the Top Menu.
One you have entered the Form number click Update.
Now in the General Authorization Window you can see an additional entry on the right side window bottom called User Authorization clicking which you will see the Additional Authorization you created. Set this as No Authorization for the user for whom you don't want to give permission to define new. Hope this helps.
Thanks,
Joseph -
Approval on sales stages defined in sales opportunity
Hi Experts,
Is is possible to configure approvals on various sales stages defined in the sales opportunity?
Please suggest some solution or workaround.Can it be customized?
Thanks in advance
Regards,
Kanishka TyagiHi Kanishka.....
Please execute this SP.....
If @object_type='101' and @transaction_type IN ('A','U')
BEGIN
If Exists (Select T0.Num from OOST T0
Where T0.StepId is not null
And T0.Num = @list_of_cols_val_tab_del)
BEGIN
Select @error = -1,
@error_message = 'You can not enter Sales Stage'
End
End
Hope this will help you......
If you want it for a particular User then add one more condition for user signature.....
Regards,
Rahul -
Add Sales Opportunity using DI API
Hello Friends,
I am trying to add Sales Opportunity using DI API.I want to set Potential amount using DI API So I set MaxLocalTotal but while compiling code its give error.Its Read only.
If I add without potential amount than its gives me error "Potetial Amout is missing"
What should I do??
My Code is
SAPbobsCOM.SalesOpportunities vSOpp;
vSOpp = (SAPbobsCOM.SalesOpportunities)globals1.oCompany.GetBusinessObject (SAPbobsCOM.BoObjectTypes.oSalesOpportunities);
vSOpp.CardCode = txtBPCode.Text;
if( txtCntctPerCode.Value!="")
vSOpp.ContactPerson = Convert.ToInt32(txtCntctPerCode.Value);
vSOpp.OpportunityName = txtOppName.Text;
vSOpp.SalesPerson = Convert.ToInt32(ddlSEmp.SelectedValue);
//vSOpp.WeightedSumLC = Convert.ToDouble(txtPotAmt.Text);
vSOpp.MaxLocalTotal = Convert.ToDouble(txtPotAmt.Text);
culture = new CultureInfo("en-US", true);
currentprovider = CultureInfo.CurrentCulture;
dt1 = DateTime.ParseExact(txtSDate.Text, "dd/MM/yyyy", culture);
vSOpp.StartDate = dt1;
if (vSOpp.Add() != 0)
//ResultMessage1.ShowFail("Failed to add a Activity");
globals1.oCompany.GetLastError(out nErr, out errMsg);
if (0 != nErr)
ResultMessage1.ShowFail(globals1.oCompany.GetLastErrorDescription());
globals1.oCompany.Disconnect();
return;
else
ResultMessage1.ShowSuccess("Activity added Successfully");
Please help me to solved this problem.
Thanks & Regards,
SwatiHi folks,
I'm facing the same problem. This issue concerns DI API of SAP Business One 8.8 (my version is SP 00 PL 11) in particular.
I've used the 2007 version so far and even though the MaxLocalTotal field in Sales Opportunity object is read-only, by writing the same value in the field with the same name on the last Opportunity Line I obtain the right value in the header.
In this version of the API, that field seems to be mandatory instead.
Does anyone have any suggestion? Thank you in advance. -
Problem in addin sales opportunity - Partners, Competitor
HI All,
I am adding sales opportunity with the help of DI objects. However I am able to add that without partner and competitors info
But while I am trying to add opportunity with Partner and competitors infornmation I am unable to do that first time when there is no entry in partner and competitor. If there is some entry in partner and competetor then I am able to update new values in partner and competitors sucessfully.
Please let me know if there is any solution of what I am doing wrong.
I am adding new info with below mentioned parameters...
_salesOpportunities.Partners.Add();
_salesOpportunities.Partners.Partners
_salesOpportunities.Partners.RelationshipCode
_salesOpportunities.Partners.Details
regards:
NeeravHi Neerav.
Please use...
_salesOpportunities.Partners.SetCurrentLine(j);
_salesOpportunities.Partners.Partners
_salesOpportunities.Partners.RelationshipCode
_salesOpportunities.Partners.Details
salesOpportunities.Partners.Add();
regards:
sandy -
Help Required for Open Sales opportunity query
Hi Experts
I need to create a query on Open Sales Opportunity where quotation has not been submitted. also all opportunities with respective sales quotation
How can i link Opr1 ( Stage), OOPR, oqut table.
Regards
RamanThanks Gordon ,
But this query is for all sales opportunity linked with Sale quotation. also it showing only last quotation .
In case in 1 sales opportunity i have 3 quotation how can it will manage toh show all quotations linked with one opportunity.
Regards
Raman -
Inset new line in sales opportunity
how can i insert an new stage in the sales opportunity. I used the following code but it not work.
Sales = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSalesOpportunities)
If Sales.GetByKey(5691) = True Then
Sales.Lines.StageKey = 4
Sales.Lines.StartDate = Date.Now
Sales.Lines.ClosingDate = Date.Now
Sales.Lines.Add()
Dim update As Integer = Sales.Update()
End IfHi André,
in the sales opportunity you need to use the Add() method before setting the properties.
try this:
If Sales.GetByKey(5691) = True Then
Sales.Lines.Add()
Sales.Lines.StageKey = 4
Sales.Lines.StartDate = Date.Now
Sales.Lines.ClosingDate = Date.Now
Be carefully with the StageKey property because refers to a foreign key.
Hope this helps.
Carmine -
Sales Opportunity number field
In Open Items report (Sales Orders) is it possible to have column displaying Sales opportunity number that the sales order was created from?
I have looked through form settings but cannot find this field?Hi Andrew.......
It is not possible to make any modification to the standard reports given by SAP. But you may have your own query report......
Regards,
Rahul -
Item & Discount added in the Sales Order
Dear All,
I have a requirement where in once a Sales Order is created with approved Quotation, then no new extra items to be added in the sales order.
Quantity in the existing line item can be decreased to the lower side but no addition in quantity to be done.
Also no change in discount condition types to be done.
Please suggest the approprite Config. If there is no standard config, then please suggest the code which needs to be written in the approprite Userexit.
Best solution will be rewarded.
Thanks and regards,
Dilip Kumar RaoHi,
To restrict creation of new items and to restrict addition of quantity to existing items, use following user-exits and coding.
Program : MV45AFZB
FORM USEREXIT_CHECK_VBAP USING US_DIALOG.
*{ INSERT D50K904678 1
if sy-tcode eq 'VA01' or sy-tcode eq 'VA02'.
check vbap-vgbel <> space and vbap-vgpos <> space.
read table vvbap with key vbeln = vbap-vgbel
posnr = vbap-vgpos.
if sy-subrc eq 0.
if vbap-kwmeng gt vvbap-kwmeng.
message e499(sy) with
'Quantity entered is greater then referenced'.
endif.
endif.
endif.
*} INSERT
ENDFORM.
Program : MV45AFZZ
FORM USEREXIT_MOVE_FIELD_TO_VBKD.
if sy-tcode eq 'VA01' or sy-tcode eq 'VA02'.
loop at xvbap where vgbel eq space
and updkz eq 'I'.
exit.
endloop.
if sy-subrc eq 0.
message e499(sy) with 'New Item is not allowed'.
endif.
endif.
ENDFORM.
-Alpesh -
Display all pending quotation on sales opportunity window
how display all pending quotation of that customer on sales opportunity window through navigation arrow?
Hi,
Run below query in query generator first and save it under query manger. Open sales opportunity and run saved query to get list of open sales quotation.
SELECT t2.docnum
FROM OOPR T0
JOIN OPR1 T1 ON T1.OpprId = T0.OpprId and T1.ObjType='23'
left join OQUT T2 on t2.DocEntry = T1.[DocID]
left JOIN QUT1 T3 ON T2.DocEntry = T3.DocEntry
where T2.[DocStatus] = 'o' and t2.cardcode = $[OOPR.cardcode]
Thanks & Regards,
Nagarajan
Maybe you are looking for
-
"error while downloading jar file"
I receive this error while trying to download a MIDlet from the web (using the P800 device).I write the jad URL , then continue to installation , and then receive the error I wrote in the subject. I have no idea what it is , this MIDlet was downloade
-
BAPI for Getting Project Profiles in Project System
hi, Can any 1 tell me the BAPI to invoke to get project profiles from project system. Thanks, Debashish Sarkar
-
Is there a Vi for varian or any other leak detectors
i was wondering about a vi for varian helium leak detectors. I no one has one i was wondering what it would take to right one. I can control the machine via telnet using comands. if i give the comand "?leak" it will return "?leak 9.1x10-7". it is the
-
Script to disable scheduled updates for Microsoft Security Essentials
I need a script to disable scheduled updates in Microsoft Security Essentials. Any help would be appreciated. Thank You.
-
INFOPATH: Only Integers allowed validation tooltip
I have a few lookup columns in an InfoPath library form template. The underlying fields are integer numbers, and the control is a dropdown which is populated from a secondary data connection. If the field is mandatory, a little validation tooltip rem