Skip to Content

How to use CreateWithReference

Hi, experts,


      1. Can somebody please explain what is the usage of CreateWithReference in studio and how to use it? I still can't figure out how to use it.


      2. Does the target BO need to have a CreateWithReference BO Action to be able to use CreateWithRef feature?

      3.  In the repository explorer, I find some standarad BOs have CreateWithReference BO Action (e.g CustomerInvoice).


And I can see it in UI designer.


But some do not have CreateWithReference action (e.g InboundDelivery) .


But the UIs (QAF, OIF) have a CreateWithRef inport.



The inport fires an event handler that calls a BO Action ( I can't find which BO Action they call because it is not allowed)  with some action parameters.


          So, number 3  question, how can I use CreateWithRef for Inbound Delievery.

Thanks in advance.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 08, 2015 at 09:01 AM

    Hi Fred,

    I can give you an example for my use case.

    In this sample I used the createwithreference to create an email activity related to the activity task (you can see the generate email in the "related items" of the task

    var act = Activity.Retrieve(ABSL:UUID.ParseFromString(this.actID));
    var instEmail = Activity.CreateWithReference(act, "39");

    instEmail.SubjectName = "Sample req n° " + act.ID.RemoveLeadingZeros() + " " + this.account;
    [ filling]
    elEmailParty.PartyName =;

    [this.binaryObject filling]
    //Create body
    var elEmailTxtCollTxt : elementsof Activity.TextCollection.Text;

    var instEmailTxtColl = instEmail.TextCollection.Create();
    elEmailTxtCollTxt.TypeCode.content = "10002";
    var instEmailTxtCollTxt = instEmailTxtColl.Text.Create(elEmailTxtCollTxt);
    var elEmailTxtCollTxtCntnt.Text.content = this.binaryObject.ToString();


    Add comment
    10|10000 characters needed characters exceeded