This topic contains 2 replies, has 0 voices, and was last updated by SererraMike 7 years, 10 months ago.

  • Author
    Posts
  • #10321

    SererraMike

    Hello,

    I have a custom record with a handful of custom date fields on it. I’m able to use a workflow to set some of my date fields based off of each other using the formula: “nlapiDateToString(nlapiAddDays(new Date(nlapiGetFieldValue(‘custrecord_custom_date’)) ,365))”.

    I found this in a help article and it works well. I’m not used to using the API formulas however, and I’d like to actually grab a joined field. I know in a more traditional formula I’d use {joinedrecord.custrecord_custom_date}. I tried (‘joinedrecord.custrecord_custom_date’), but the format seems incorrect. Could anyone point me in the right direction?

    Thanks,

    Mike
    This is a cached copy. Click here to see the original post.

  • #10322

    zackb22

    Hey Mike,

    When using the API you would need to load the record of the other field. You could try “nlapiLookupField(‘record type’, ‘joined record field’, ‘custrecord_custom_date’). So if it were a Sales Order and the joining field was ‘createdfrom’, it would be “nlapiLookupField(‘salesorder’, ‘createdfrom’, ‘custrecord_custom_date’)”. This is how I would use it in a script, it is possible that it should also work in a workflow.

    Thanks,

    Zack

  • #10323

    SererraMike

    Hi Zack, Thanks for the input. I ended up just creating a new field on the record and sourcing it from the joined field I was trying to use. When I get some time I’ll play around with your suggestion. good to know.

    Thanks,

You must be logged in to reply to this topic.