Skip to Content

Creation of quote and access products

Hi Gurus,

I have customer request that during creating quote product availability has to be checked with dedicated web service.

It means that on creating new quote and before save button is hit I have to loop over added products in quote that is creating.

Currently, I don't know how to access with ABSL code chosen products :-(

Keyword "this" is not helping?

I believe it is simple, but I don't now magic right now.

Please help.

br,

Zoran

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 24, 2017 at 11:48 PM

    I found BO elements. For the record to access products during creation of Quote you have to use following code:

    in BO extension:

    import AP.Common.GDT;
    import AP.CRM.Global;
    [Extension] businessobject AP.CRM.Global:CustomerQuote {
    	node produktiList [0,n]{
    		element	ItemElement		:LANGUAGEINDEPENDENT_EXTENDED_Text; 
    	}
    	node Item {
          		node ItemParty {
    		} 
           	} 
       	node Party {
       	} 
    	node ItemProposal {
       	} 
    }
    

    in Event-BeforeSave:

    foreach (var elementicQUOTE in this.Item ){
    	var n = this.produktiList.Create();	
    	n.ItemElement = elementicQUOTE.ItemProduct.Material_V1.InternalID.content
    }
    

    br,

    Zoran

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2017 at 04:47 PM

    Thanks for the answer. I know everything that you mention :-). The only missing thing is which BO element represent products added in quote. Actually I need info how to access element from attached picture. Once I access this I can check furtherer more on web service if product is available or not.

    Thanks.

    Zoran

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2017 at 04:22 PM

    Hi,

    Please enhance the script file for CustomerQuote event-BeforeSave. While generating the script please make sure "Mass" is unchecked. Once done then activate the Script file generated as well as BO Extension.

    Post that, just do "this"(case sensitive) to access the BO elements.

    For more details please check the studio help guide available online.

    Thanks

    Saurabh

    Add comment
    10|10000 characters needed characters exceeded